I'm trying to get acquainted With CKEditor. I took one of the samples ("Replace DIV elements on the fly") and changed it a little, so that editor was opened on single click instead of double click. Here is the complete source of my HTML file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> <script type="text/javascript"> //<![CDATA[ var editor = null; window.onload = function () { var elems = document.getElementsByTagName('div'); for (var i = 0; i < elems.length; ++i) { if (elems[i].className == 'editable') { elems[i].onclick = function () { if (editor) editor.destroy(); editor = CKEDITOR.replace(this); } } } } //]]> </script> </head> <body> <h2>CKEditor Test</h2> <div class="editable">Text in div 1</div> <div class="editable">Text in div 2</div> </body> </html>
Re: Replaced DIV remains invisible in Firefox when closing C
Thanks!