/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
{\r
// Creates an HTML structure that reproduces the editor class hierarchy.\r
var html =\r
- '<span class="cke_shared">' +\r
+ '<span class="cke_shared "' +\r
+ ' dir="'+ editor.lang.dir + '"' +\r
+ '>' +\r
'<span class="' + editor.skinClass + ' ' + editor.id + ' cke_editor_' + editor.name + '">' +\r
'<span class="' + CKEDITOR.env.cssClass + '">' +\r
'<span class="cke_wrapper cke_' + editor.lang.dir + '">' +\r
// Get the deeper inner <div>.\r
container = mainContainer.getChild( [0,0,0,0] );\r
\r
+ // Save a reference to the shared space container.\r
+ !editor.sharedSpaces && ( editor.sharedSpaces = {} );\r
+ editor.sharedSpaces[ spaceName ] = container;\r
+\r
// When the editor gets focus, we show the space container, hiding others.\r
editor.on( 'focus', function()\r
{\r
var container = CKEDITOR.dom.element.createFromHtml( [\r
'<span' +\r
' id="cke_', name, '"' +\r
- ' onmousedown="return false;"' +\r
' class="', editor.skinClass, ' ', editor.id, ' cke_editor_', name, '"' +\r
' dir="', editor.lang.dir, '"' +\r
' title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' +\r
' lang="', editor.langCode, '"' +\r
- ( CKEDITOR.env.webkit? ' tabindex="' + tabIndex + '"' : '' ) +\r
+ ( CKEDITOR.env.webkit? ' tabindex="' + tabIndex + '"' : '' ) +\r
' role="application"' +\r
' aria-labelledby="cke_', name, '_arialbl"' +\r
( style ? ' style="' + style + '"' : '' ) +\r
'<div id="%title#" class="%title" role="presentation"></div>' +\r
'<a id="%close_button#" class="%close_button" href="javascript:void(0)" title="' + editor.lang.common.close+'" role="button"><span class="cke_label">X</span></a>' +\r
'<div id="%tabs#" class="%tabs" role="tablist"></div>' +\r
- '<table class="%contents" role="presentation"><tr>' +\r
+ '<table class="%contents" role="presentation">' +\r
+ '<tr>' +\r
'<td id="%contents#" class="%contents" role="presentation"></td>' +\r
- '</tr></table>' +\r
- '<div id="%footer#" class="%footer" role="presentation"></div>' +\r
+ '</tr>' +\r
+ '<tr>' +\r
+ '<td id="%footer#" class="%footer" role="presentation"></td>' +\r
+ '</tr>' +\r
+ '</table>' +\r
'</div>' +\r
'<div id="%tl#" class="%tl"></div>' +\r
'<div id="%tc#" class="%tc"></div>' +\r
close : close,\r
tabs : body.getChild( 2 ),\r
contents : body.getChild( [ 3, 0, 0, 0 ] ),\r
- footer : body.getChild( 4 )\r
+ footer : body.getChild( [ 3, 0, 1, 0 ] )\r
}\r
};\r
},\r
\r
destroy : function( editor )\r
{\r
- var container = editor.container;\r
- container.clearCustomData();\r
- editor.element.clearCustomData();\r
+ var container = editor.container,\r
+ element = editor.element;\r
\r
if ( container )\r
+ {\r
+ container.clearCustomData();\r
container.remove();\r
+ }\r
\r
- if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE )\r
- editor.element.show();\r
-\r
- delete editor.element;\r
+ if ( element )\r
+ {\r
+ element.clearCustomData();\r
+ editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.show();\r
+ delete editor.element;\r
+ }\r
}\r
};\r
})() );\r
*/\r
CKEDITOR.editor.prototype.getResizable = function()\r
{\r
- return this.container.getChild( 1 );\r
+ return this.container;\r
};\r
\r
/**\r
/**\r
* Fired after the editor instance is resized through\r
* the {@link CKEDITOR.editor.prototype.resize} method.\r
- * @name CKEDITOR#resize\r
+ * @name CKEDITOR.editor#resize\r
* @event\r
*/\r