Hi,
I am new to CkEditor, I have created a simple custom plugin by following the example http://docs.cksource.com/CKEditor_3.x/Tutorials/SimpleLink_Plugin_Part_1. Everything seems to work fine but I have added a button to the toolbar that is not showing up.
Plugin:
------
CKEDITOR.plugins.add( 'PluginEx',
{
init: function( editor )
{
alert("I am in PluginEx");
}
});
editor.addCommand( 'PluginEx', new CKEDITOR.dialogCommand( 'PluginEx' ) );
editor.ui.addButton( 'PluginEx',
{
label: 'some text',
command: 'PluginEx',
icon: this.path+'images/icon.png'
});
HTML:
-------
My Editor:<br>
<textarea id="editor1" name="editor1" style="visibility: hidden; "><p>Initial value.</p></textarea>
<script type="text/javascript">
CKEDITOR.replace( 'editor1',
{
extraPlugins : 'PluginEx',
toolbar :
[
['Source', '-', 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
['PluginEx','-','About','-',]
]
});
Please help to sort this out
Wed, 10/03/2012 - 12:43
#1
Re: Can't see image button for custom plugin
try like this in config,js
config.toolbar = 'MyToolbar';
config.toolbar_MyToolbar =
[
['Source', '-', 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
['PluginEx','-','About','-',]
]
let me know status...
Re: Can't see image button for custom plugin
I've removed code from html and added to the config.js file but it doesn't seem to work.
Re: Can't see image button for custom plugin
editor.addCommand( 'PluginEx', new CKEDITOR.dialogCommand( 'PluginEx' ) );
this line should be inside of init function.. this is out side ..
pls check again.. and read instruction carefully once again...
Re: Can't see image button for custom plugin