Hi, I found a problem. I have one form instance on page and I move this via jQuery, where is needed. But after first move, CKEditor goes damaged with error:
TypeError: this.document.getWindow(...).$ is undefined
.
Code for you:
<!doctype html> <html> <head> <meta charset="utf-8" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="ckeditor/ckeditor.js"></script> <script src="ckeditor/adapters/jquery.js"></script> <title>Test</title> </head> <body> <p><a href="#" id="move">Move CKEditor</a></p> <script> $(function(){ $('#form_text').ckeditor(); $('#move').on('click', function(e) { e.preventDefault(); if($('#first>#form').size()>0) $('#form').appendTo('#second'); else $('#form').appendTo('#first'); }); }); </script> <div id="first" style="min-height:200px;border:2px solid blue"> <form id="form"> <textarea name="form_text" id="form_text"></textarea><br /> </form> </div> <div id="second" style="min-height:200px;border:2px solid red;margin-top:1em"></div> </body> </html>Working example
You should post this on the
You should post this on the CKEditor dev site. Somebody will check if this is indeed a bug and see if there's already duplicates.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Solution
OK, solution: https://dev.ckeditor.com/ticket/12258 - instead of iframe use divarea plugin: http://ckeditor.com/addon/divarea