CKEditor resizing

For SO question#37887901

by Louys Patrice Bessette

HTML

<script src="//cdn.ckeditor.com/4.5.9/standard/ckeditor.js"></script>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<h3>Try to resize the "window" by dragging<br>
← this line </h3>

Script message: <span id="msg"></span>
<form id="CKform">
  <textarea name="editor1" id="editor1" rows="10" cols="80">
    This is my textarea to be replaced with CKEditor.
  </textarea>
</form>
<br>
<h3 id="2nd"></h3>

CSS

#CKform{
	position:fixed;
	top:10%;
}
#msg{
	color:#187810;
	font-weight:bold;
}

JavaScript

// Replace the <textarea id="editor1"> with a CKEditor
	// instance, using default configuration.
	CKEDITOR.replace( 'editor1', {
		height : 200,
		autoGrow_minHeight : 200,
		on:{
			resize: function(){
				$("#msg").html("CKEditor resized!");
				$("#2nd").html("This is a different event!");
			}
		}
	});

	window.onresize = function() {
		$("#msg").html("Window resized!");
		$("#CKform").css({"top":"30%"});
		$("#2nd").html("Also try to resize CKEditor by dragging it's bottom-right corner");
		
	};