How do I add new toolbar buttons to FCKEditor?
I have to replace the standard Horizontal Rule button with two buttons, relating to two different styles of Horizontal Rule.
FWIW, this is for a Drupal installation of FCKEditor.
TIA
Pete.
I have to replace the standard Horizontal Rule button with two buttons, relating to two different styles of Horizontal Rule.
FWIW, this is for a Drupal installation of FCKEditor.
TIA
Pete.
Re: Create new toolbar buttons
take the existing code:
ckeditor/_source/plugins/horizontalrule/plugin.js
copy the plugin and name it something snazzy like
ckeditor/_source/plugins/horizontalrule2/plugin.js
change the var pluginName = 'horizontalrule2';
and var horizontalruleCmd to var horizontalrule2Cmd (just so you know what you are doing and change it's functionality
upload it to /ckeditor/plugins/horizontalrule2/plugin.js
and then you need to tweak the config options to load it up
I do this in by CKEDITOR.Replace
and you need to add HorizontalRule2 to your toolbar.
as below: