Bug? Moving form with CKEditor through DOM
TypeError: this.document.getWindow(...).$ is undefined
<!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