mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 12:30:02 +02:00
* API/CKEditor: Version update to 3.6.6
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
return last;
|
||||
}
|
||||
|
||||
function getNodeIndex( node ) {
|
||||
var parent = node.parent;
|
||||
return parent ? CKEDITOR.tools.indexOf( parent.children, node ) : -1;
|
||||
}
|
||||
|
||||
function trimFillers( block, fromSource )
|
||||
{
|
||||
// If the current node is a block, and if we're converting from source or
|
||||
@@ -159,12 +164,29 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
// The contents of table should be in correct order (#4809).
|
||||
table : function( element )
|
||||
{
|
||||
var children = element.children;
|
||||
// Clone the array as it would become empty during the sort call.
|
||||
var children = element.children.slice( 0 );
|
||||
children.sort( function ( node1, node2 )
|
||||
{
|
||||
return node1.type == CKEDITOR.NODE_ELEMENT && node2.type == node1.type ?
|
||||
CKEDITOR.tools.indexOf( tableOrder, node1.name ) > CKEDITOR.tools.indexOf( tableOrder, node2.name ) ? 1 : -1 : 0;
|
||||
} );
|
||||
var index1, index2;
|
||||
|
||||
// Compare in the predefined order.
|
||||
if ( node1.type == CKEDITOR.NODE_ELEMENT &&
|
||||
node2.type == node1.type )
|
||||
{
|
||||
index1 = CKEDITOR.tools.indexOf( tableOrder, node1.name );
|
||||
index2 = CKEDITOR.tools.indexOf( tableOrder, node2.name );
|
||||
}
|
||||
|
||||
// Make sure the sort is stable, if no order can be established above.
|
||||
if ( !( index1 > -1 && index2 > -1 && index1 != index2 ) )
|
||||
{
|
||||
index1 = getNodeIndex( node1 );
|
||||
index2 = getNodeIndex( node2 );
|
||||
}
|
||||
|
||||
return index1 > index2 ? 1 : -1;
|
||||
} );
|
||||
},
|
||||
|
||||
embed : function( element )
|
||||
@@ -288,7 +310,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly;
|
||||
}
|
||||
|
||||
var protectElementRegex = /<(a|area|img|input)\b([^>]*)>/gi,
|
||||
var protectElementRegex = /<(a|area|img|input|source)\b([^>]*)>/gi,
|
||||
protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;
|
||||
|
||||
var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
|
||||
|
Reference in New Issue
Block a user