Opened 10 years ago
Closed 10 years ago
#12897 closed Bug (invalid)
Link popup OK, Cancel does not work
Reported by: | Debajyoti | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
I am using <script src="cdn.ckeditor.com/4.4.7/basic/ckeditor.js"></script>
with 2 instances of editor in the same page.
If link is set for first time in both of the editor it saves correctly. Page is designed like that after submit it dont refresh, instead different view is rendered which has option to edit old entry.
On next edit of link one editor shows simple link popup box, but other shows different one with more options(screenshots attached) simple one work fine after clicking OK or Cancel. But complex popup dont not respond to OK or Cancel.
If I go back and reopen the editor and open the link poupups, none of them work.
But if i refresh the page before each edit all work fine.
I believe this is a bug.
Attachments (2)
Change History (5)
Changed 10 years ago by
Attachment: | Complex Link dialog.png added |
---|
Changed 10 years ago by
Attachment: | Normal link dialog.png added |
---|
comment:1 Changed 10 years ago by
Status: | new → pending |
---|---|
Version: | 4.4.7 |
comment:2 Changed 10 years ago by
- No we are using multiple link for in one page.
- In our groovy server page for the view we set
<script src="//cdn.ckeditor.com/4.4.7/basic/ckeditor.js"></script>
and create text areas like
<textarea id="editor1" name="editor1" class="ckeditor">${value1}</textarea>
<textarea id="editor2" name="editor2" class="ckeditor">${value2}</textarea>
and before rending the view I delete CKEDITOR if exists.
if(typeof CKEDITOR == "object") { delete CKEDITOR; }
- error in Chrome DevTools console
Uncaught ReferenceError: CKEDITOR is not definedckeditor.js?_=1423134585158:13 CKEDITOR.editor.CKEDITOR.editor.fireckeditor.js?_=1423134585158:215 fckeditor.js?_=1423134585158:215 (anonymous function)ckeditor.js?_=1423134585158:25 (anonymous function)
comment:3 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
No we are using multiple link for in one page.
By link I understood and meant <script src="//cdn.ckeditor.com/4.4.7/basic/ckeditor.js">
. You have told me that you don't use one link but your example in next poit kind of says different. What exactly did you mean by link? Please note that if you were talking about script tag calling ckeditor.js, you should use only one per page. There is no sense in importing scripts more than once.
and before rending the view I delete CKEDITOR if exists.
I think you should rather destroy editor befre submitting your view and recreate it when view is rendered again (I believe the DOM is destroyed on submit thus it would be good to clean up before destroying). By destroy I mean CKEditor.instances.instanceName.destroy();
and not delete CKEditor;
.
CKEDITOR is not defined
This ihmo correcponds to point two. Most likley you are deleting CKEDITOR
thus you get this error.
I'm closing this issue because I think it is implementation issue and not bug in editor. The CKEDITOR
object should never be unavailable once you have imported the ckeditor.js script.
@debajyoti if you don’t agree please provide reduced (to the minimum) sample application that allows reproducing this problem.
This is a link dialog with options from all tabs.
What errors you get in Firebug console (or Chrome DevTools console) when view is rendered or when you edit links?