Hello,
I have what seems to be a very simple problem with a plug that I am trying to create to insert source code into the editor. I am copying the Creating a CKEditor Plugin with a Custom Dialog Window example http://docs.cksource.com/CKEditor_3.x/Tutorials/SimpleLink_Plugin_Part_1. All I have is the textarea in my dialog box.
How do I get code that has been pasted into that box into the source code of the editor? The code from the example that I have edited looks like the following, which seems like over-kill.
CKEDITOR.dialog.add( 'simpleLinkDialog', function( editor ) { return { title : 'Tabbed Content', minWidth : 400, minHeight : 200, contents : [ { id : 'general', label : 'Settings', elements : [ { type : 'html', html : 'This dialog window lets you create simple links for your website.' }, { type : 'textarea', id : 'contents', label : 'Tabbed Content Source Code', validate : CKEDITOR.dialog.validate.notEmpty('The Displayed Text field cannot be empty.'), required : true, commit : function( data ) { data.contents = this.getValue(); } } ] } ], onOk : function() { var dialog = this, data = {}, link = editor.document.createElement( 'a' ); this.commitContent( data ); link.setHtml(data.contents); editor.insertElement(link); } }; });