The Simple Plugin Sample gives the following sample of creating a dialogCommand.
---------------------------------------------------------------------------------
Creating an Editor Command
We want our plugin to have a dialog window, so we need to define an editor command that opens a new dialog window. To do this, we will need to use theeditor.addCommand function to register the abbrDialog command.
editor.addCommand( 'abbrDialog', new CKEDITOR.dialogCommand( 'abbrDialog' ) );
-----------------------------------------------------------------------------
By this sample I assumed that a normal command should be added like:
editor.addCommand( 'mycommand', new CKEDITOR.command(...) );
But this is not the case. The addCommand function creates the CKEDITOR.command for you based on the command definition as second parameter. Apparently, the dialogCommand is some kind of specialized command definition.
When you accidentally add a command like above, you will have trouble calling editor.execCommand( 'mycommand', 'my custom data' ). The command created by the addCommand function receives the second parameter but does not forward it to the command you created and passed to the addCommand function. Instead, your command.exec function receives two parameters, both the editor instance.
Hopefully this helps not making the same mistake as I did.
CKeditor not displaying the PHP data
Hai ,i want to display the PHP simple PHP data in CKEditor,In source when i given <?php echo "Hai" ?> it displaying
<p> <?php echo "Hai" ?></p>
My CKeditor file is
How can i display the PHP content in the VIew page.Please Help me.I strucked with this
Simple Plugin Sample addCommand Note
Hello Devika,
Please, start a new topic instead of replying to the post titled 'Simple Plugin Sample addCommand Note'.