Hi,
Im having difficulty integrating ckeditor inline editing with my divs which were created by clicking a button.
I created a button that generates a <div>, something like this:
var button = document.getElementById('addButton');
button.onclick = newDiv;
function newDiv(){
var b= document.getElementById('body1');
var divs = document.createElement('div');
divs.contentEditable = "true";
divs.innerHTML = "new div created!";
b.appendChild(divs); }
I know that the contentEditable worked as I can write/edit text inside the divs, however ckeditor is not showing. Please help me. Thanks
Mark
You need to init CKEditor on
You need to init CKEditor on those divs by hand. Add something like this to newDiv():
div.id = 'uniqueId';
CKEDITOR.inline(div.id);