What ?
FCKeditor has always been a better choice for web editors. It is open source and has good results. FCKeditor plug-in is an extended feature of FCKeditor.
Why?
Although FCKeditor can adapt to use under general conditions, you may be unsatisfied with the only functions of FCKeditor. OK. FCKeditor provides plug-in open functions, so you can do it as long as you can think of it.
How?
I will introduce the development of the FCKeditor plug-in with a simple "Hello" as an example (Statement: I am also a novices. If there is anything wrong, please point it out, everyone has made progress.)
First, enter the plugins directory under the editor file in the FCKeditor editor directory. This directory is placed in the Fckeditor plugin. So, create a folder named 'hello'.
Step 2: Enter the 'hello' folder. Create a "" file. This is necessary for fckeditor plug-in, mainly plug-in registration, etc.
Create the language file again. Create a 'lang' folder under the 'hello' folder. Create a language file under the 'lang' folder. The language file naming method of the Fckeditor plug-in is: country or region.js. For example, Chinese is, Simplified Chinese is, English is, etc. We build two "" and "".
Then edit the language file. We edit "". Write the following content: ="Hello"; (note the code containing ";", js), write in "": ="Hello";
The FCKeditor plug-in language is named as: FCKLang.Variable name="Language Definition"
OK, the language problem definition is completed, and then the plug-in definition.
Open the second step "".
//register
('hello',new FCKDialogCommand('hello',,['hello'].Path+"",200,200));
//Define the toolbar
var NHello=new FCKToolbarButton('hello',);
=['hello'].Path+'';
//register
('hello',NHello);
OK, don't understand? Detailed description:
Plugin mechanism:Register command - Define toolbar - Register to toolbar
Registration command:: (command name, dialog command)
Dialog command: FCKDialogCommand (command name, dialog title, URl, width, height)
This way the registration command is completed, and then a toolbar is defined
FCKToolbarButton (command name, button title)
You'd better add an icon:IconPath=Icon Address
Now the command has been registered and the toolbar has been defined, and then add:
(Command name, toolbar);
Note: "" means that you want to display that the following statement should be included in the html.
<script language="javascript">
var dialog = ;
var oEditor = () ;
var FCKLang = ;
</script>
OK. The plug-in is finished, how to display it?
Find "" in the Fckeditor directory, which is the settings file of fckeditor. turn up
” = + 'plugins/' ;”
Add to:"(‘hello','zh-cn,en'); ”
explain:(Plugin name, 'language file');Where the language file is optional, it will be automatically set if not.
Then in "["Default"]=..Add it casually to "[]" in "'hello' (note that there are quotes)。
OK…! Completed
OK, let’s reconfirm the process of FCKEditor plug-in development:
Create “” - Create plug-ins (language files, etc.) - Add plug-ins.
Necessary steps to create a plug-in: plug in the registration command - define the toolbar - register to the toolbar