<p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">ckeditor 버전 : <span style="font-family:arial, helvetica, tahoma, verdana, sans-serif;font-size:12px;white-space:nowrap;">CKEditor 4.7.3 </span></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">ckeditor에 이미지 파일 첨부기능을 추가하고 있는 중입니다.</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <div style="color:#666666;font-family:dotum, verdana, applegothic, sans-serif;background-color:#969696;"><code class="html plain" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;">CKEDITOR.replace( 'ckeditor', {//해당 이름으로 된 textarea에 에디터를 적용</code></div> <div style="color:#666666;font-family:dotum, verdana, applegothic, sans-serif;background-color:#969696;"><code class="html spaces" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;"> </code><code class="html plain" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;">width:'100%',</code></div> <div style="color:#666666;font-family:dotum, verdana, applegothic, sans-serif;background-color:#969696;"><code class="html spaces" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;"> </code><code class="html plain" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;">height:'400px',</code></div> <div style="color:#666666;font-family:dotum, verdana, applegothic, sans-serif;background-color:#969696;"><code class="html spaces" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;"> </code><code class="html plain" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;">filebrowserImageUploadUrl: '/community/imageUpload' //여기 경로로 파일을 전달하여 업로드 시킨다.</code></div> <div style="color:#666666;font-family:dotum, verdana, applegothic, sans-serif;background-color:#969696;"><code class="html spaces" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;"> </code><code class="html plain" style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:10.8px;padding:2px 4px;color:#c7254e;background-color:#f9f2f4;">});</code></div> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">이런식으로 이미지파일 업로드를 완성했는데, 스프링시큐리티를 쓰고 있어 csrf 값을 같이 넘겨줘야 하는데 ckeditor에서만 인식을 못하고 있습니다. </p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">기존 ajax 호출은 헤더값에 토큰값을 파라미터로 추가하여 csrf 문제 없이 사용하고 있습니다.</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">문제는 파일업로드 할떄 어떤 값이라도 같이 보내주기만 하면 되는데 업로드기능 자체가 custom 이 안되고 있는 것으로 보입니다.</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">1번 )</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> CKEDITOR.on( 'fileUploadRequest', function( evt ) {</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> var xhr = evt.data.fileLoader.xhr;</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> alert('ggggg');</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> xhr.setRequestHeader( 'Cache-Control', 'no-cache' );</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> xhr.setRequestHeader( 'csrf header ', 'HEADER' );</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> xhr.withCredentials = true;</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> <span style="white-space:pre;"> </span>} );</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> </p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">2번 )</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> CKEDITOR.on('instanceReady', function (ev) {</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> <span style="white-space:pre;"> </span>alert('gggggh');</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> <span style="white-space:pre;"> </span>var header = $("meta[name='_csrf_header']").attr("content");</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> <span style="white-space:pre;"> </span>var token = $("meta[name='_csrf']").attr("content");</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> <span style="white-space:pre;"> </span></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> ev.editor.on( 'fileUploadRequest', function( evt ) {</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> var xhr = evt.data.fileLoader.xhr;</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> alert('ggggg');</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> xhr.setRequestHeader( 'Cache-Control', 'no-cache' );</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> xhr.setRequestHeader( 'csrf header ', 'HEADER' );</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> xhr.withCredentials = true;</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> } );</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"> });</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">위 두가지 방법으로 테스트해보았습니다.</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">이미지를 올릴때 alert을 출력하나 확인중인데 절대 반응하지 않네요 .</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">도큐멘트를 참고 하여 했습니다.</p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><a target="_blank" href="https://docs.ckeditor.com/#!/guide/dev_file_upload" style="background-color:transparent;color:#2a6496;" target="_blank">https://docs.ckeditor.com/#!/guide/dev_file_upload</a> <a target="_blank" href="https://docs.ckeditor.com/#!/guide/dev_file_upload" target="_blank" title="새창으로 열기" style="background-color:transparent;color:#2a6496;"><span class="fa fa-external-link" style="display:inline-block;line-height:1;font-family:FontAwesome;font-size:inherit;"></span></a></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;"><br></p> <p style="margin:0px 0px 10px;color:#333333;font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;font-size:14px;">문제 해결하신분 있으면 도움부탁드립니다...</p> <div><br></div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.