원본 : http://docs.springnote.com/pages/685039
개요#
괜찮은 웹 편집기다.
http://www.fckeditor.net/ 에서 FCKeditor 최신 버전과 java버전을 다운로드 한다.
FCKeditor 최신버전을 적당한 위치에서 압축해제 한다.
java 버전의 src(소스)를 소스 디렉토리에 넣는다. 또는 jar 파일을 WEB-INF/lib 디렉토리에 넣는다.
설정#
fckconfig.js 파일에서 서블릿이 호출되도록 다음 6개 라인을 수정합니다.
- FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=/fck_connector';
- FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=/fck_connector';
- FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=/fck_connector';
- FCKConfig.LinkUploadURL = "/fck_simpleuploader?Type=Image&Command=FileUpload";
- FCKConfig.ImageUploadURL = "/fck_simpleuploader?Type=Image&Command=FileUpload";
- FCKConfig.FlashUploadURL = "/fck_simpleuploader?Type=Image&Command=FileUpload";
web.xml에 서블릿을 추가합니다.
- <servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SimpleUploader</servlet-name>
<servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFile</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFile</param-name>
<param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsImage</param-name>
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsImage</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFlash</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/fck_connector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/fck_simpleuploader</url-pattern>
</servlet-mapping>
fckeditor/editor/filemanager/browser/default/frmupload.html 파일을 수정합니다.
OnSubmit 메서드의 return true; 라인 이전에 다음을 추가합니다.
- SetCurrentFolder(oConnector.ResourceType, top.frmFolders.sActiveFolder);
사용#
내용을 html로 얻기
- var contents = FCKeditorAPI.GetInstance('fckeditor_contents').GetXHTML(true);
문제점 해결#
weblogic#
error loading fckstyle.xml #
web.xml 에 다음을 추가한다.(web.xml 이 아닌 다른 곳에 추가하려면???)
- <mime-mapping>
<extension>xml</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
참고문서#
이 글은 스프링노트에서 작성되었습니다.
'Programming' 카테고리의 다른 글
| 통합자막 분리용 스크립트 (1) | 2009/07/10 |
|---|---|
| 계산기 (0) | 2008/04/21 |
| FCKeditor (7) | 2008/04/03 |
| [펌] oracle dbms utility 관련 구문 (0) | 2008/03/13 |
| ibatis-쿼리xml (0) | 2007/12/05 |
| [펌][html]마우스 스타일 (0) | 2007/07/03 |
댓글을 달아 주세요
Great stuff..! Excellent! Keep it up!
2011/10/12 13:03 [ ADDR : EDIT/ DEL : REPLY ]I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post.
2011/11/09 13:26 [ ADDR : EDIT/ DEL : REPLY ]I wanted to thank you for this great read article! I definitely enjoyed every little bit of it.
2011/12/23 08:43 [ ADDR : EDIT/ DEL : REPLY ]이것은 내가 지금까지 읽은이 주제에 관한 최고의 게시됩니다. 나는 진정으로 꽤 그것으로 감동 했어. 블로그를 유지!
2011/12/29 12:52 [ ADDR : EDIT/ DEL : REPLY ]This can be a greatest post with this subject I've ever examine. We are genuinely really satisfied from it. Retain writing a blog!
2012/01/16 20:20 [ ADDR : EDIT/ DEL : REPLY ]Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
2012/02/07 08:27 [ ADDR : EDIT/ DEL : REPLY ]I came across this kind of as a possible informational information along with intriguing, i really think that is incredibly valuable and well-informed for me. I must thanks for the actual efforts they've designed to write this particular very good write-up. If at all possible, when you obtain knowledge, would you thoughts upgrading your website with additional information? It is rather of great help for myself.
2012/02/07 19:45 [ ADDR : EDIT/ DEL : REPLY ]