I am using jQuery and CKEditor to form a quick reply section. When the page loads the quick reply section is hidden(display:none) but when a user clicks on the header it slides down and reveals the quick reply box(slideToggle).
Also when a user clicks a button next to a post it inserts the contents of the post into the quick reply box, however it only does this if the quick reply box is visible.
When they click this button its supposed to start the CKEditor instance and then slide the box into view. It slides the box and starts the instance but wont add the html into the textarea unless i click again. Anyone know why?
if (editor2)
{
editor2.insertHtml(value);
}
else
{
jQuery('div#quick_reply').slideToggle(1000);
editor2 = CKEDITOR.appendTo( 'quick_reply', config);
editor2.insertHtml(value);
}