(i) Options for FCKeditor controls Select retention
This is the case by default.
By modifying this, here is what I want, and of course you can choose according to your needs.
Specific documents you can go to read http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide
Here, just will fckconfig.js in the
fckconfig.toolbarsets["Default"] = [ [' Source ', ' 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 ', ' Table ', ' rule ', ' smiley ', ' Specialchar ', ' pagebreak ', ', [' Style ', ' Fontformat ', ' FontName ', ' fontsize '], [' textcolor ', ' bgcolor ', [' Fitwindow ', ' Showblocks ', '-', ' about '] ] ; Copy to our own definition of JS file
Myconfig.js, and make simple modifications to remove unwanted controls. Note that the original style is retained.
fckconfig.toolbarsets["myTest"] = [[' Source ', ' docprops '], [' Bold ', ' italic ', ' underline ', ' strikethrough ', '-', '] Subscript ', ' superscript '], [' orderedlist ', ' unorderedlist ', '-', ' outdent ', ' Indent ', ' Blockquote '], [' Justifyleft ', '] Justifycenter ', ' justifyright ', ' justifyfull '], [' Link ', ' Unlink ', ' Anchor '], [' Image ', ' Flash ', ' Table ', ' rule ', ' Smiley ', ' Specialchar ', ' pagebreak ', '/', [' Style ', ' Fontformat ', ' fontname ', ' fontsize '], [' TextColor ', ' bgcolor '], [' Fitwindow ', ' showblocks ', '-', ' about ']//No comma for the last row. ] ; At this point, the function has been modified and refreshed.
(ii) Font type additions to the FCKeditor control
Attributes can be found from the Fckconfig.js
Fckconfig.fontnames = ' Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana ';
Note The default is only these styles, you can place the Fckconfig.fontnames property to
Myconfig.jsIn
fckconfig.fontnames= "XXFarEastFont-Arial _gb2312; italics; bold; official script; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana ' ";
This allows you to add the fonts we need to the editor.
(iii) switch of carriage return to line and paragraph
If we need a carriage return-enter; paragraph-shift+enter; this is more convenient and suitable for people's habits.
Only need to go to the fckconfig.js to find
Fckconfig.entermode = ' P ';
Fckconfig.shiftentermode = ' BR ';
Change into
Fckconfig.entermode = ' BR ';
Fckconfig.shiftentermode = ' P ';
To complete, and if you need additional functionality, you can read the official documentation.