1. 首先将FCKEditor文件夹复制到项目WebRoot下
2.将fckeditor-java-core-2.4.1.jar,commons-fileupload-1.2.1.jar,
commons-io-1.3.2.jar,slf4j-api-1.5.2.jar以及slf4j-simple-1.5.2.jar
复制到WEB-INF/lib下
3.fckconfig.js
FCKConfig.CustomConfigurationsPath = FCKConfig.EditorPath + 'myconfig.js' ;
可以通过修改自定义文件路径 myconfig.js
4.myconfig.js
1 FCKConfig.ToolbarSets["myToolbar"] = [ //自定义工具栏 2 ['Source','-','Preview'], 3 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 4 '/', 5 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], 6 ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'], 7 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], 8 ['Image','Table','Rule','Smiley','SpecialChar','PageBreak'], 9 '/', 10 ['Style','FontFormat','FontName','FontSize'], 11 ['TextColor','BGColor'], 12 ['FitWindow','ShowBlocks'] // No comma for the last row. 13 ] ; 14 15 //指定文件字体 16 FCKConfig.FontNames = '����;����;��������;����Ҧ��;����;�����п�;����' ;//�Զ������� 17 18 //字体大小 19 FCKConfig.FontSizes = '5px;10px;15px;20px;25px;30px;35px;40px;45px' ;//�Զ��������С 20 21 //表情图片的存放地址 22 FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/qq/' ;//����ͼƬ��ŵ�ַ 23 24 FCKConfig.SmileyImages = ['001.gif','002.gif','003.gif','004.gif',//����ͼƬ�б� 25 '005.gif','006.gif','007.gif', 26 '008.gif','009.jpg','010.jpg', 27 '011.gif','012.gif','013.gif','014.gif', 28 '015.gif','016.gif','017.jpg' 29 ] ; 30 //以下是图片的长度,宽度,高度 31 FCKConfig.SmileyColumns = 4 ;//�趨����ͼƬ��ʾ���� 32 33 FCKConfig.SmileyWindowWidth = 320 ;//���ñ���ͼƬ�Ŀ� 34 FCKConfig.SmileyWindowHeight = 110 ;//���ñ���ͼƬ�ĸ�
5. 在jsp页面引入
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>