#3958: Creating more than one instance during runtime kills the former instances ------------------------+--------------------------------------------------- Reporter: hebuiss42 | Owner: Type: Bug | Status: closed Priority: Normal | Milestone: Component: General | Version: CKEditor 3.0 RC Resolution: invalid | Keywords: ------------------------+--------------------------------------------------- Changes (by alfonsoml):
* status: new => closed * resolution: => invalid Comment: You are writing the innerHTML of the container, so all the content inside of it is recreated. To start understanding your problem just test your code without any reference to CKEditor: {{{ <!DOCTYPE HTML> <html> <body> <input class="Button" type="button" value="New Editor" onClick="addEditor()"> <br> <div id="area" style="border:thin solid black;">this is a div</div> <script type="text/javascript"> <!-- editorCount = 0; function addEditor() { editorCount += 1; area = document.getElementById("area").innerHTML + '<br><textarea name="editor_'+editorCount+'" id="editor_'+editorCount+'" cols="70" rows="3"></textarea>'; document.getElementById("area").innerHTML = area; } --> </script> </body> </html> }}} Add a textarea, put some text and then try to add a new one. As you see there's no CKEditor involved and you have lost all your data. -- Ticket URL: <http://dev.fckeditor.net/ticket/3958#comment:1> FCKeditor <http://www.fckeditor.net/> The text editor for Internet ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ FCKeditor-Trac mailing list FCKeditor-Trac@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fckeditor-trac