ckeditor jquery 1.11.0 + jquery UI 1.11.4
ckeditor jquery 1.11.0
by Kevin Kamel
HTML
<script src="https://cdn.skatrix.com/tools/ckeditor/4.2.1/ckeditor.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script>
$.widget( "ui.dialog", $.ui.dialog, {
/*! jQuery UI - v1.11.4 - 2015-06-05
* http://bugs.jqueryui.com/ticket/9087#comment:27 - bugfix
* http://bugs.jqueryui.com/ticket/4727#comment:23 - bugfix
* allowInteraction fix to accommodate windowed editors
*/
_allowInteraction: function( event ) {
if ( this._super( event ) ) {
return true;
}
// address interaction issues with general iframes with the dialog
if ( event.target.ownerDocument != this.document[ 0 ] ) {
return true;
}
// address interaction issues with dialog window
if ( $( event.target ).closest( ".cke_dialog" ).length ) {
return true;
}
// address interaction issues with iframe based drop downs in IE
if ( $( event.target ).closest( ".cke" ).length ) {
return true;
}
}
});
var editor, html = '';
var config = {};
function createEditor()
{
if ( editor )
return;
$("#editor").bind('dialogopen', function() //JQ
{
editor = CKEDITOR.replace('editor1', config, 'aaa');
}).bind('dialogclose', function()
{
removeEditor();//CK
$(this).dialog('destroy');
})
.dialog({autoOpen: false,
maxHeight:0.95 * $(window).height(),//1
width: 800,
modal: true,
position: 'top',
resizable: false,
autoResize: true }).dialog('open');
}
function removeEditor()
{
if ( !editor )
return;
// Destroy the editor.
editor.destroy();
editor = null;
}
</script>
<p>Click the buttons to create jquery dialog and...
CSS
#editor1 {display: none}