SoFunction
Updated on 2025-04-13

Things to note when adding FCKeditor plug-in

So when I was on WC, I decided to modify the editor. However, I usually google it before I start, which is often very effective. I found that FCKeditor actually supports plug-ins, and many plug-ins can be used after simple configuration. However, there is very little information about how to use plug-ins in this regard (maybe I'm too stupid). I'll give you a plug-in package. How to use it? After experimenting with several plug-ins, I found the corresponding method, which is actually very simple.

1. Put the plugin into the corresponding plugin directory "/FCKeditor/edito/plugins/".

2. Open "/FCKeditor/" and find the section "["Default"] = [". You can choose a position to add a plug-in, and the tool position can also be adjusted at will.

Copy the codeThe code is as follows:

= 'In' ;

["Default"] = [
['Source',/*'bbcode',*/'DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
//'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','RemoteUpload','Insertplayer','KMP','YouTube','InsertCode','Table','Rule','Smiley','SpecialChar','PageBreak'],
//'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
] ;

3. Find " = + 'plugins/' ;" You can add the corresponding plug-in below. How to add depends on whether the plug-in has a multi-language version. Here are the two methods. However, it is important to pay great attention to: it must be case sensitive, which must be consistent with the definition in the plug-in. Because I do cross-domain, some plug-ins also need to set ="".
Copy the codeThe code is as follows:

= + 'plugins/' ;
( 'remoteupload', 'en,zh-cn' ) ;
( 'Insertplayer' ) ;
( 'KMP') ;
( 'YouTube','en,zh-cn') ;
( 'InsertCode') ;
....

4. Some plug-ins (for example: InsertCode, which is the "insert code" we use when writing blogs). After editing in the background, there is no relevant CSS style and no effect can be seen (the code of this article is only in a text box). So how can we see the effect immediately? We can find " = + 'css/fck_editorarea.css' ", and this "fck_editorarea.css" is the style of the back editing area. We can copy the CSS content in InsertCode here. It's simple.

I originally wanted to simply use a mini blog to make a memo, but I couldn't write it down. I felt that writing these with blogs made others think I was idiotic. Hehe. The division of labor will be done in the future. If you write ideas on the mini blog, I will write the process of realizing the ideas here.