by sergionni » Fri Nov 20, 2009 1:30 pm
Hello, dear CKEditor community. I've got the next error,when submit form,that contains CKEditor component: i.contentWindow is null ckeditor.js (line 18)The following configuration for CKEDitor: - Code: Select all
<script> var oScript = document.createElement("script"); oScript.type = "text/javascript"; oScript.text += "var $j = jQuery.noConflict();"; oScript.text += "$j(document).ready(function(){"; oScript.text += "CKEDITOR.replace('content2', {toolbar : ["; oScript.text += "['Source'],"; oScript.text += "['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'],"; oScript.text += "['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],"; oScript.text += "['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],"; oScript.text += "'/',"; oScript.text += "['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],"; oScript.text += "['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],"; oScript.text += "['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],"; oScript.text += "['Link','Unlink','Anchor'],"; oScript.text += "['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],"; oScript.text += "'/',"; oScript.text += "['Styles','Format','Font','FontSize'],"; oScript.text += "['TextColor','BGColor'],"; oScript.text += "['Maximize', 'ShowBlocks']],"; oScript.text += "language : '${lang}',"; oScript.text += "entities: false,"; oScript.text += "filebrowserUploadUrl : '<%=request.getContextPath()%>/pages/article-ajax?command=upload',"; oScript.text += "width: '100%',"; oScript.text += "height: 350,"; oScript.text += "skin : 'v2'"; oScript.text += "});"; oScript.text += "new Tooltips('[title]');"; oScript.text += "});"; document.body.appendChild(oScript); </script>
CKEDitor displayed correctly on UI with all specified options above. Textarea, which is replaced by CKEDitor in my .jsp looks like: - Code: Select all
<textarea name="content2" rows="" cols="">${articleForm.content}</textarea>
Perhaps, reason is that several instances of CKEDitor created, i read on other branches of forum. I tried destroy() function, it didn't help. Don't know what to do more... May be you faced such a problem? Thank you for help. -- Sergei
-
sergionni
-
- Posts: 1
- Joined: Fri Nov 20, 2009 12:41 pm
|