Hi, I would like to use document.getElementById(divname).innerHTML; to get the value inside a div. I'm trying to use this together with the "Replace DIV elements on the fly" code (specifically, getting it to work before and/or after opening and closing the editor) however, the code fails to perform whenever I attempt this. I've tried using the exact same code without CKEditor involved and have had no problems with it. However, if I try using CKEditor with it then as already said, it fails to return anything.
That's the code I'm using it with for testing and I'm trying to print the result out into an alert box. Is there something about CKEditor that prevents the above code from working? Or is there an alternative to innerHTML to get the text from the div (or even the editor before it disappears)?
For the most part, the codes are unchanged from the sample codes. The most alterations I've done was include the close button from the "Create and destroy editor instances for Ajax applications" sample.
function getText(divname) { var html = document.getElementById(divname).value; return html; }
That's the code I'm using it with for testing and I'm trying to print the result out into an alert box. Is there something about CKEditor that prevents the above code from working? Or is there an alternative to innerHTML to get the text from the div (or even the editor before it disappears)?
For the most part, the codes are unchanged from the sample codes. The most alterations I've done was include the close button from the "Create and destroy editor instances for Ajax applications" sample.