Dear FCK-Freaks
I use FCKeditor for allmost every (PHP-) project I develop and really love it. Now I have to do
a more advanced task with FCKeditor:
There has to be a new Icon in the toolbar. It opens a dialogue box (so I have to specify an onClick-Event for the toolbar-icon, that's all),
in the dialogue box the user can select something (that is possible for me). Then, if the user clicks OK, I want to place a String in the
editor field where the cursor is. Something like
<input type="submit" onClick="fckeditor.placeStringOnCustorsPosition('myStringWhichGoesToTheEditorInCurrentCursorsPosition')" />
It should insert it as HTML, so if the string is '<a href="mytarget.html">Internal link</a>' it should insert exactly the HTML code and
display the link as it is, so you see only "Internal Link" as a link.
Would it be possible in an easy way? I hope you can help me - I read through the wiki and did not get it
I know how to create the dialogue box, that's not the problem. The problem is the Icon and the Placement of a String right at the cursors
position.
Thank you a lot in advance
Remo
Re: Custom icon in toolbar (Plugin?)
Only way you can do that is by indeed building a plugin.
http://wiki.fckeditor.net/Developer%27s ... n/Plug-ins didn't help? Maybe try diving into the code of an existing dialog or plugin which functionality comes close to what you want.
Also have a look at my 'HOWTO - Work with the selection in the editor'
Other option is to have someone write the plugin for you. I offer paid support and development, so feel free to mail me.