Hi,
I want to build my own plugin but I'm stucked.
In order to understand the logical of the Ckeditor API I started
with a very simple plugin:
- A toolbar button wich opens a dialog box.
- A field in the dialog box where users can type something.
- then when Ok button is pressed, the chain typed is inserted in
the edited document (after the cursor for ex).
It's ok for the toolbar button and the dialog box, but I don't understand
how can I insert something in the edited document.
What is the method and object to use for it ?
Heres a snippet of my code:
CKEDITOR.dialog.add( 'myplugin', function( editor ) { return { title : 'my title', minWidth : 390, minHeight : 130, onOk : function() { var name = this.getValueOf('contid','fieldid'); // code ????????? return true; }, contents : [{ id : 'contid' label : '', title : '', elements : [{ id: 'tab1', label : '', title : '', type : 'vbox', children : [ { type: 'text', id: 'fieldid', title : 'my field', width: '300px', label: 'a field', labelLayout: 'vertical', } ] //children }] //elements }], //contents buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] }; // return } );
Re: Help for coding my plugin!
Re: Help for coding my plugin!
Re: Help for coding my plugin!
Re: Help for coding my plugin!
Re: Help for coding my plugin!
That file is meant to understand the basics about how to use the API, so please, read it thoroughly as it isn't that big.
Re: Help for coding my plugin!
ok, I'll check that.
Thanks