Hello, I'm trying to understand how to add a new function to the toolbar-set.
I want to add a button called "Add formula", when the user clicks on it he will be prompt for the formula (a simple javascript prompt will do fine) and the editor will add a <img src="http://someAddress.com?formula=HIS-FORMULA" /> to the text.
can anyone help me please?
thanks in advance.
Mon, 07/28/2008 - 15:13
#1
Re: Adding a simple new option to the toolbar
Hi,
You should probably start to read http://docs.fckeditor.net/FCKeditor_2.x ... n/Plug-ins
Don't forget to enable the plugin into the fckconfig.js and add the button to the toolbar.
You'll be able to find an example I made with the attached file.
Slum.
Attachments:
Re: Adding a simple new option to the toolbar
I do have a small question though:
how can I associate the command button with a function that i've written?
can you tell me where the editor stores his functions so I can look at it and have some reference?
thanks again.
Re: Adding a simple new option to the toolbar
In my example, the functions are stored into the abbr.html file : function 'Ok()' line 26
![:)](http://b.cksource.com/a/2/img/smilies/icon_e_smile.gif)
You should create the form items (if you need), and add your JS code.
If you want to execute your JS routine by clicking on the toolbar button, I have no idea about how to make that. You should first start to get an intermediate form.
Good luck