http://docs.cksource.com/CKEditor_3.x/Tutorials/SimpleLink_Plugin_Part_1
How do I get code that has been pasted into that box into the source code of the editor?
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);
}
};
});
