Hello,
I want to write a plug-in that creates a new button (similar to the strikethrough button).
Am I missing the link to the documentation or isn't there any?
Based on the examples in the Wiki, I am able to create a button in the toolbar, but without the documentation for the different FCKCommands, it's hard to guess and I kinda wanted to do this properly.
My Goal:
Create a button that replaces the selected text by <jedi>selected text</jedi> so it exactly copies the behavior of a strikethrough button, but with another tag.
Any help is appreciated.
Best regards,
Marc M.
I want to write a plug-in that creates a new button (similar to the strikethrough button).
Am I missing the link to the documentation or isn't there any?
Based on the examples in the Wiki, I am able to create a button in the toolbar, but without the documentation for the different FCKCommands, it's hard to guess and I kinda wanted to do this properly.
My Goal:
Create a button that replaces the selected text by <jedi>selected text</jedi> so it exactly copies the behavior of a strikethrough button, but with another tag.
Any help is appreciated.
Best regards,
Marc M.
Re: Plugin: Add a button
I found the combobox plugin very helpful as this allowed me to create a dropdown box and run commands. I changed the supplied example a little so now I can highlight some text and prefix & suffix the selection with the <span> </span> tags so I could set the font, style & colours.
My next step is doing something similar but using a button instead for a single command - basically a customised link option.
See http://sourceforge.net/tracker/index.php?func=detail&aid=1442286&group_id=75348&atid=737639
If you need assistance with it I can help a little by showing my configuaration. But like you I'm trying to find the command for adding a button & using a button instead - that's how I found your question.
Steve
Re: Plugin: Add a button
Hi Steve,
Thanks a lot, this helped me out.
It's still no match for documentation or anything, but I'm finally getting the results I wanted by reverse engineering this code.
Here is a copy of my code:
http://www.iondev.lu/fckeditor/netnoi.txt
This plugin allows you to add a "netnoi" button to your toolbar.
The button will replace the currently selected text (if any) by "<netnoi>text</netnoi>"
FYI, this is part of a Mediawiki extension I'm writing.
Best regards,
Marc
Re: Plugin: Add a button
You should read this: http://docs.fckeditor.net/FCKeditor_2.x ... n/Plug-ins and the rest of linked pages.
These post can be useful in order to understand better the samples plugin that are available in the distributed code:
http://alfonsoml.blogspot.com/2007/11/p ... ction.html
http://alfonsoml.blogspot.com/2007/11/b ... ditor.html
Re: Plugin: Add a button
Re: Plugin: Add a button
with the example from jedimarcus i now have a button, that inserts a h3-tag. so far good.
but there is one thing i miss: all the format-buttons, like bold, justify etc. are get highlighted when i have marked a word/paragraph matching that tag/format. my h3-button will not be highlighted, the format-drop-downl-list get's changed to Headline 3. but i don't want to have the hole format-options. just a simple h3 button (or any other headline button.)
one more question: is the "B" in the toolbar an image? where can i find it, or is it just text?
thanxs
markus