2 * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
7 * @fileOverview The "divarea" plugin. It registers the "wysiwyg" editing
8 * mode using a DIV element.
11 CKEDITOR
.plugins
.add( 'divarea', {
12 afterInit: function( editor
) {
13 // Add the "wysiwyg" mode.
14 // Do that in the afterInit function, so it'll eventually overwrite
15 // the mode defined by the wysiwygarea plugin.
16 editor
.addMode( 'wysiwyg', function( callback
) {
17 var editingBlock
= CKEDITOR
.dom
.element
.createFromHtml( '<div class="cke_wysiwyg_div cke_reset" hidefocus="true"></div>' );
19 var contentSpace
= editor
.ui
.space( 'contents' );
20 contentSpace
.append( editingBlock
);
22 editingBlock
= editor
.editable( editingBlock
);
24 editingBlock
.detach
= CKEDITOR
.tools
.override( editingBlock
.detach
,
27 org
.apply( this, arguments
);
32 editor
.setData( editor
.getData( 1 ), callback
);
33 editor
.fire( 'contentDom' );