mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-28 17:57:38 +00:00
Imported CKEDITOR 3.0
Monotone-Parent: 5f9c08dd6b5b34d815ddb2108abbf4055e846934 Monotone-Revision: b2cf7eda0ef8f15fb6e78f8c38a7406a47bcdd2f Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-08-26T14:03:12 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -11,7 +11,7 @@ CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
title : editor.lang.clipboard.title,
|
||||
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350,
|
||||
minHeight : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 250 : 240,
|
||||
minHeight : CKEDITOR.env.quirks ? 250 : 245,
|
||||
htmlToLoad : '<!doctype html><script type="text/javascript">'
|
||||
+ 'window.onload = function()'
|
||||
+ '{'
|
||||
@@ -21,7 +21,12 @@ CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
+ 'document.designMode = "on";'
|
||||
+ 'var iframe = new window.parent.CKEDITOR.dom.element( frameElement );'
|
||||
+ 'var dialog = iframe.getCustomData( "dialog" );'
|
||||
+ 'dialog.fire( "iframeAdded", { iframe : iframe } );'
|
||||
+ ''
|
||||
+ 'iframe.getFrameDocument().on( "keydown", function( e )\
|
||||
{\
|
||||
if ( e.data.getKeystroke() == 27 )\
|
||||
dialog.hide();\
|
||||
});'
|
||||
+ '};'
|
||||
+ '</script><style>body { margin: 3px; height: 95%; } </style><body></body>',
|
||||
|
||||
@@ -99,6 +104,12 @@ CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
this.getParentEditor().document.getBody().$.contentEditable = 'true';
|
||||
},
|
||||
|
||||
onLoad : function()
|
||||
{
|
||||
if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) && editor.lang.dir == 'rtl' )
|
||||
this.parts.contents.setStyle( 'overflow', 'hidden' );
|
||||
},
|
||||
|
||||
onOk : function()
|
||||
{
|
||||
var container = this.getContentElement( 'general', 'editing_area' ).getElement(),
|
||||
@@ -106,7 +117,9 @@ CKEDITOR.dialog.add( 'paste', function( editor )
|
||||
editor = this.getParentEditor(),
|
||||
html = iframe.$.contentWindow.document.body.innerHTML;
|
||||
|
||||
editor.insertHtml( html );
|
||||
setTimeout( function(){
|
||||
editor.insertHtml( html );
|
||||
}, 0 );
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user