' +
- '
' +
- '
' +
- 'X' +
- '
' +
- '
' +
- '
' +
- '' +
+ '
' +
+ '' +
+ '' +
+ ' ' +
+ ' X' +
+ ' ' +
+ ' ' +
+ '' +
' ' +
'' +
'' +
@@ -122,7 +192,8 @@ CKEDITOR.themes.add( 'default', (function()
'' +
'' +
'' +
- '',
+ ' |
' +
+ '
',
//Hide the container when loading skins, later restored by skin css.
( CKEDITOR.env.ie ? '' : '' ),
@@ -132,11 +203,13 @@ CKEDITOR.themes.add( 'default', (function()
.replace( /#/g, '_' + baseIdNumber )
.replace( /%/g, 'cke_dialog_' ) );
- var body = element.getChild( [ 0, 0 ] );
+ var body = element.getChild( [ 0, 0, 0, 0, 0 ] ),
+ title = body.getChild( 0 ),
+ close = body.getChild( 1 );
// Make the Title and Close Button unselectable.
- body.getChild( 0 ).unselectable();
- body.getChild( 1 ).unselectable();
+ title.unselectable();
+ close.unselectable();
return {
@@ -144,10 +217,10 @@ CKEDITOR.themes.add( 'default', (function()
parts :
{
dialog : element.getChild( 0 ),
- title : body.getChild( 0 ),
- close : body.getChild( 1 ),
+ title : title,
+ close : close,
tabs : body.getChild( 2 ),
- contents : body.getChild( 3 ),
+ contents : body.getChild( [ 3, 0, 0, 0 ] ),
footer : body.getChild( 4 )
}
};
@@ -155,8 +228,9 @@ CKEDITOR.themes.add( 'default', (function()
destroy : function( editor )
{
- var container = editor.container,
- panels = editor.panels;
+ var container = editor.container;
+ container.clearCustomData();
+ editor.element.clearCustomData();
/*
* IE BUG: Removing the editor DOM elements while the selection is inside
@@ -183,14 +257,10 @@ CKEDITOR.themes.add( 'default', (function()
if ( container )
container.remove();
- for( var i = 0 ; panels && i < panels.length ; i++ )
- panels[ i ].remove();
-
if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE )
- {
editor.element.show();
- delete editor.element;
- }
+
+ delete editor.element;
}
};
})() );
@@ -209,9 +279,9 @@ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, res
if ( numberRegex.test( width ) )
width += 'px';
- var contents = CKEDITOR.document.getById( 'cke_contents_' + this.name );
- var outer = resizeInner ? contents.getAscendant( 'table' ).getParent()
- : contents.getAscendant( 'table' ).getParent().getParent().getParent();
+ var container = this.container,
+ contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ),
+ outer = resizeInner ? container.getChild( 1 ) : container;
// Resize the width first.
// WEBKIT BUG: Webkit requires that we put the editor off from display when we
@@ -235,5 +305,31 @@ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, res
CKEDITOR.editor.prototype.getResizable = function()
{
- return this.container.getChild( [ 0, 0 ] );
+ return this.container.getChild( 1 );
};
+
+/**
+ * Makes it possible to place some of the editor UI blocks, like the toolbar
+ * and the elements path, into any element in the page.
+ * The elements used to hold the UI blocks can be shared among several editor
+ * instances. In that case, only the blocks of the active editor instance will
+ * display.
+ * @name CKEDITOR.config.sharedSpaces
+ * @type Object
+ * @default undefined
+ * @example
+ * // Place the toolbar inside the element with ID "someElementId" and the
+ * // elements path into the element with ID "anotherId".
+ * config.sharedSpaces =
+ * {
+ * top : 'someElementId',
+ * bottom : 'anotherId'
+ * };
+ * @example
+ * // Place the toolbar inside the element with ID "someElementId". The
+ * // elements path will remain attached to the editor UI.
+ * config.sharedSpaces =
+ * {
+ * top : 'someElementId'
+ * };
+ */