i have a button which when clicked it will add the content of the div into the editor. This works fine but i also have a button which adds a blank editor. so im checking to see if there is an editor. if there is then i add the html of the div to the editor. if there isnt then i create the editor then add the html. the problemm is that if there is no editor and i click the button to add the content it iwll create the editor but not add the content until i click it again.
if (editor2)
{
editor2.insertHtml(value);
}
else
{
var config = {toolbar : 'quick_reply', height: '70px', width: '500px', 'float': 'left'};
editor2 = CKEDITOR.appendTo( 'quick_reply', config);
editor2.insertHtml(value);
}
Re: editor.insertHtml
Look at the ajax.html example to see exactly how to create instances with initial content: