2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
7 * @fileOverview The "wysiwygarea" plugin. It registers the "wysiwyg" editing
\r
8 * mode, which handles the main editing area space.
\r
13 // List of elements in which has no way to move editing focus outside.
\r
14 var nonExitableElementNames = { table:1,pre:1 };
\r
16 // Matching an empty paragraph at the end of document.
\r
17 var emptyParagraphRegexp = /\s*<(p|div|address|h\d|center)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\1>)?\s*(?=$|<\/body>)/gi;
\r
19 function onInsertHtml( evt )
\r
21 if ( this.mode == 'wysiwyg' )
\r
24 this.fire( 'saveSnapshot' );
\r
26 var selection = this.getSelection(),
\r
29 if ( this.dataProcessor )
\r
30 data = this.dataProcessor.toHtml( data );
\r
32 if ( CKEDITOR.env.ie )
\r
34 var selIsLocked = selection.isLocked;
\r
39 var $sel = selection.getNative();
\r
40 if ( $sel.type == 'Control' )
\r
42 $sel.createRange().pasteHTML( data );
\r
45 this.getSelection().lock();
\r
48 this.document.$.execCommand( 'inserthtml', false, data );
\r
50 CKEDITOR.tools.setTimeout( function()
\r
52 this.fire( 'saveSnapshot' );
\r
57 function onInsertElement( evt )
\r
59 if ( this.mode == 'wysiwyg' )
\r
62 this.fire( 'saveSnapshot' );
\r
64 var element = evt.data,
\r
65 elementName = element.getName(),
\r
66 isBlock = CKEDITOR.dtd.$block[ elementName ];
\r
68 var selection = this.getSelection(),
\r
69 ranges = selection.getRanges();
\r
71 var selIsLocked = selection.isLocked;
\r
76 var range, clone, lastElement, bookmark;
\r
78 for ( var i = ranges.length - 1 ; i >= 0 ; i-- )
\r
80 range = ranges[ i ];
\r
82 // Remove the original contents.
\r
83 range.deleteContents();
\r
85 clone = !i && element || element.clone( true );
\r
87 // If we're inserting a block at dtd-violated position, split
\r
88 // the parent blocks until we reach blockLimit.
\r
92 while ( ( current = range.getCommonAncestor( false, true ) )
\r
93 && ( dtd = CKEDITOR.dtd[ current.getName() ] )
\r
94 && !( dtd && dtd [ elementName ] ) )
\r
96 // Split up inline elements.
\r
97 if ( current.getName() in CKEDITOR.dtd.span )
\r
98 range.splitElement( current );
\r
99 // If we're in an empty block which indicate a new paragraph,
\r
100 // simply replace it with the inserting block.(#3664)
\r
101 else if ( range.checkStartOfBlock()
\r
102 && range.checkEndOfBlock() )
\r
104 range.setStartBefore( current );
\r
105 range.collapse( true );
\r
109 range.splitBlock();
\r
113 // Insert the new node.
\r
114 range.insertNode( clone );
\r
116 // Save the last element reference so we can make the
\r
117 // selection later.
\r
118 if ( !lastElement )
\r
119 lastElement = clone;
\r
122 range.moveToPosition( lastElement, CKEDITOR.POSITION_AFTER_END );
\r
124 var next = lastElement.getNextSourceNode( true );
\r
125 if ( next && next.type == CKEDITOR.NODE_ELEMENT )
\r
126 range.moveToElementEditStart( next );
\r
128 selection.selectRanges( [ range ] );
\r
131 this.getSelection().lock();
\r
133 // Save snaps after the whole execution completed.
\r
134 // This's a workaround for make DOM modification's happened after
\r
135 // 'insertElement' to be included either, e.g. Form-based dialogs' 'commitContents'
\r
137 CKEDITOR.tools.setTimeout( function(){
\r
138 this.fire( 'saveSnapshot' );
\r
143 // DOM modification here should not bother dirty flag.(#4385)
\r
144 function restoreDirty( editor )
\r
146 if ( !editor.checkDirty() )
\r
147 setTimeout( function(){ editor.resetDirty(); } );
\r
150 var isNotWhitespace = CKEDITOR.dom.walker.whitespaces( true ),
\r
151 isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true );
\r
153 function isNotEmpty( node )
\r
155 return isNotWhitespace( node ) && isNotBookmark( node );
\r
158 function isNbsp( node )
\r
160 return node.type == CKEDITOR.NODE_TEXT
\r
161 && CKEDITOR.tools.trim( node.getText() ).match( /^(?: |\xa0)$/ );
\r
165 * Auto-fixing block-less content by wrapping paragraph (#3190), prevent
\r
166 * non-exitable-block by padding extra br.(#3189)
\r
168 function onSelectionChangeFixBody( evt )
\r
170 var editor = evt.editor,
\r
171 path = evt.data.path,
\r
172 blockLimit = path.blockLimit,
\r
173 selection = evt.data.selection,
\r
174 range = selection.getRanges()[0],
\r
175 body = editor.document.getBody(),
\r
176 enterMode = editor.config.enterMode;
\r
178 // When enterMode set to block, we'll establing new paragraph only if we're
\r
179 // selecting inline contents right under body. (#3657)
\r
180 if ( enterMode != CKEDITOR.ENTER_BR
\r
182 && blockLimit.getName() == 'body'
\r
185 restoreDirty( editor );
\r
186 var fixedBlock = range.fixBlock( true,
\r
187 editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
\r
189 // For IE, we should remove any filler node which was introduced before.
\r
190 if ( CKEDITOR.env.ie )
\r
192 var first = fixedBlock.getFirst( isNotEmpty );
\r
193 first && isNbsp( first ) && first.remove();
\r
196 // If the fixed block is blank and already followed by a exitable
\r
197 // block, we should revert the fix. (#3684)
\r
198 if ( fixedBlock.getOuterHtml().match( emptyParagraphRegexp ) )
\r
200 var previousElement = fixedBlock.getPrevious( isNotWhitespace ),
\r
201 nextElement = fixedBlock.getNext( isNotWhitespace );
\r
204 if ( previousElement && previousElement.getName
\r
205 && !( previousElement.getName() in nonExitableElementNames )
\r
206 && range.moveToElementEditStart( previousElement )
\r
207 || nextElement && nextElement.getName
\r
208 && !( nextElement.getName() in nonExitableElementNames )
\r
209 && range.moveToElementEditStart( nextElement ) )
\r
211 fixedBlock.remove();
\r
216 // Notify non-IE that selection has changed.
\r
217 if ( !CKEDITOR.env.ie )
\r
218 editor.selectionChange();
\r
221 // All browsers are incapable to moving cursor out of certain non-exitable
\r
222 // blocks (e.g. table, list, pre) at the end of document, make this happen by
\r
223 // place a bogus node there, which would be later removed by dataprocessor.
\r
224 var lastNode = body.getLast( CKEDITOR.dom.walker.whitespaces( true ) );
\r
225 if ( lastNode && lastNode.getName && ( lastNode.getName() in nonExitableElementNames ) )
\r
227 restoreDirty( editor );
\r
228 if ( !CKEDITOR.env.ie )
\r
229 body.appendBogus();
\r
231 body.append( editor.document.createText( '\xa0' ) );
\r
235 CKEDITOR.plugins.add( 'wysiwygarea',
\r
237 requires : [ 'editingblock' ],
\r
239 init : function( editor )
\r
241 var fixForBody = ( editor.config.enterMode != CKEDITOR.ENTER_BR )
\r
242 ? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false;
\r
244 editor.on( 'editingBlockReady', function()
\r
254 // Support for custom document.domain in IE.
\r
255 var isCustomDomain = CKEDITOR.env.isCustomDomain();
\r
257 // Creates the iframe that holds the editable document.
\r
258 var createIFrame = function( data )
\r
267 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' +
\r
268 ' style="width:100%;height:100%"' +
\r
269 ' frameBorder="0"' +
\r
270 ( !CKEDITOR.env.webkit ?
\r
271 // Support for custom document.domain in IE.
\r
272 ' src="javascript:void((function(){' +
\r
273 'document.open();' + // To avoid HTTPS warnings.
\r
275 'document.domain=\'' + document.domain + '\';' : '' ) +
\r
276 'document.close();' +
\r
279 ' allowTransparency="true"' +
\r
282 // Register onLoad event for iframe element, which
\r
283 // will fill it with content and set custom domain.
\r
284 iframe.on( 'load', function( e )
\r
286 e.removeListener();
\r
287 var doc = iframe.getFrameDocument().$;
\r
289 // Custom domain handling is needed after each document.open().
\r
291 if ( isCustomDomain )
\r
292 doc.domain = document.domain;
\r
298 var accTitle = editor.lang.editorTitle.replace( '%1', editor.name );
\r
300 if ( CKEDITOR.env.gecko )
\r
302 // Accessibility attributes for Firefox.
\r
303 mainElement.setAttributes(
\r
308 iframe.setAttributes(
\r
314 else if ( CKEDITOR.env.webkit )
\r
316 iframe.setAttribute( 'title', accTitle ); // Safari 4
\r
317 iframe.setAttribute( 'name', accTitle ); // Safari 3
\r
319 else if ( CKEDITOR.env.ie )
\r
321 // Accessibility label for IE.
\r
322 fieldset = CKEDITOR.dom.element.createFromHtml(
\r
323 '<fieldset style="height:100%' +
\r
324 ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? ';position:relative' : '' ) +
\r
326 '<legend style="display:block;width:0;height:0;overflow:hidden;' +
\r
327 ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? 'position:absolute' : '' ) +
\r
329 CKEDITOR.tools.htmlEncode( accTitle ) +
\r
332 , CKEDITOR.document );
\r
333 iframe.appendTo( fieldset );
\r
334 fieldset.appendTo( mainElement );
\r
337 if ( !CKEDITOR.env.ie )
\r
338 mainElement.append( iframe );
\r
341 // The script that launches the bootstrap logic on 'domReady', so the document
\r
342 // is fully editable even before the editing iframe is fully loaded (#4455).
\r
343 var activationScript =
\r
344 '<script id="cke_actscrpt" type="text/javascript" cke_temp="1">' +
\r
345 'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
\r
348 // Editing area bootstrap code.
\r
349 var contentDomReady = function( domWindow )
\r
356 var domDocument = domWindow.document,
\r
357 body = domDocument.body;
\r
359 // Remove this script from the DOM.
\r
360 var script = domDocument.getElementById( "cke_actscrpt" );
\r
361 script.parentNode.removeChild( script );
\r
363 delete CKEDITOR._[ 'contentDomReady' + editor.name ];
\r
365 body.spellcheck = !editor.config.disableNativeSpellChecker;
\r
367 if ( CKEDITOR.env.ie )
\r
369 // Don't display the focus border.
\r
370 body.hideFocus = true;
\r
372 // Disable and re-enable the body to avoid IE from
\r
373 // taking the editing focus at startup. (#141 / #523)
\r
374 body.disabled = true;
\r
375 body.contentEditable = true;
\r
376 body.removeAttribute( 'disabled' );
\r
379 domDocument.designMode = 'on';
\r
381 // IE, Opera and Safari may not support it and throw
\r
383 try { domDocument.execCommand( 'enableObjectResizing', false, !editor.config.disableObjectResizing ) ; } catch(e) {}
\r
384 try { domDocument.execCommand( 'enableInlineTableEditing', false, !editor.config.disableNativeTableHandles ) ; } catch(e) {}
\r
386 domWindow = editor.window = new CKEDITOR.dom.window( domWindow );
\r
387 domDocument = editor.document = new CKEDITOR.dom.document( domDocument );
\r
389 // Gecko/Webkit need some help when selecting control type elements. (#3448)
\r
390 if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera) )
\r
392 domDocument.on( 'mousedown', function( ev )
\r
394 var control = ev.data.getTarget();
\r
395 if ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) )
\r
396 editor.getSelection().selectElement( control );
\r
400 // Webkit: avoid from editing form control elements content.
\r
401 if ( CKEDITOR.env.webkit )
\r
403 // Prevent from tick checkbox/radiobox/select
\r
404 domDocument.on( 'click', function( ev )
\r
406 if ( ev.data.getTarget().is( 'input', 'select' ) )
\r
407 ev.data.preventDefault();
\r
410 // Prevent from editig textfield/textarea value.
\r
411 domDocument.on( 'mouseup', function( ev )
\r
413 if ( ev.data.getTarget().is( 'input', 'textarea' ) )
\r
414 ev.data.preventDefault();
\r
418 // IE standard compliant in editing frame doesn't focus the editor when
\r
419 // clicking outside actual content, manually apply the focus. (#1659)
\r
420 if ( CKEDITOR.env.ie
\r
421 && domDocument.$.compatMode == 'CSS1Compat' )
\r
423 var htmlElement = domDocument.getDocumentElement();
\r
424 htmlElement.on( 'mousedown', function( evt )
\r
426 // Setting focus directly on editor doesn't work, we
\r
427 // have to use here a temporary element to 'redirect'
\r
429 if ( evt.data.getTarget().equals( htmlElement ) )
\r
430 ieFocusGrabber.focus();
\r
434 var focusTarget = ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) ?
\r
435 domWindow : domDocument;
\r
437 focusTarget.on( 'blur', function()
\r
439 editor.focusManager.blur();
\r
442 focusTarget.on( 'focus', function()
\r
444 // Gecko need a key event to 'wake up' the editing
\r
445 // ability when document is empty.(#3864)
\r
446 if ( CKEDITOR.env.gecko )
\r
449 while ( first.firstChild )
\r
450 first = first.firstChild;
\r
452 if ( !first.nextSibling
\r
453 && ( 'BR' == first.tagName )
\r
454 && first.hasAttribute( '_moz_editor_bogus_node' ) )
\r
456 var keyEventSimulate = domDocument.$.createEvent( "KeyEvents" );
\r
457 keyEventSimulate.initKeyEvent( 'keypress', true, true, domWindow.$, false,
\r
458 false, false, false, 0, 32 );
\r
459 domDocument.$.dispatchEvent( keyEventSimulate );
\r
460 var bogusText = domDocument.getBody().getFirst() ;
\r
461 // Compensate the line maintaining <br> if enterMode is not block.
\r
462 if ( editor.config.enterMode == CKEDITOR.ENTER_BR )
\r
463 domDocument.createElement( 'br', { attributes: { '_moz_dirty' : "" } } )
\r
464 .replace( bogusText );
\r
466 bogusText.remove();
\r
470 editor.focusManager.focus();
\r
473 var keystrokeHandler = editor.keystrokeHandler;
\r
474 if ( keystrokeHandler )
\r
475 keystrokeHandler.attach( domDocument );
\r
477 if ( CKEDITOR.env.ie )
\r
479 // Override keystrokes which should have deletion behavior
\r
480 // on control types in IE . (#4047)
\r
481 domDocument.on( 'keydown', function( evt )
\r
483 var keyCode = evt.data.getKeystroke();
\r
485 // Backspace OR Delete.
\r
486 if ( keyCode in { 8 : 1, 46 : 1 } )
\r
488 var sel = editor.getSelection(),
\r
489 control = sel.getSelectedElement();
\r
493 // Make undo snapshot.
\r
494 editor.fire( 'saveSnapshot' );
\r
496 // Delete any element that 'hasLayout' (e.g. hr,table) in IE8 will
\r
497 // break up the selection, safely manage it here. (#4795)
\r
498 var bookmark = sel.getRanges()[ 0 ].createBookmark();
\r
499 // Remove the control manually.
\r
501 sel.selectBookmarks( [ bookmark ] );
\r
503 editor.fire( 'saveSnapshot' );
\r
505 evt.data.preventDefault();
\r
510 // PageUp/PageDown scrolling is broken in document
\r
511 // with standard doctype, manually fix it. (#4736)
\r
512 if ( domDocument.$.compatMode == 'CSS1Compat' )
\r
514 var pageUpDownKeys = { 33 : 1, 34 : 1 };
\r
515 domDocument.on( 'keydown', function( evt )
\r
517 if ( evt.data.getKeystroke() in pageUpDownKeys )
\r
519 setTimeout( function ()
\r
521 editor.getSelection().scrollIntoView();
\r
528 // Adds the document body as a context menu target.
\r
529 if ( editor.contextMenu )
\r
530 editor.contextMenu.addTarget( domDocument, editor.config.browserContextMenuOnCtrl !== false );
\r
532 setTimeout( function()
\r
534 editor.fire( 'contentDom' );
\r
538 editor.mode = 'wysiwyg';
\r
539 editor.fire( 'mode' );
\r
543 isLoadingData = false;
\r
545 if ( isPendingFocus )
\r
548 isPendingFocus = false;
\r
550 setTimeout( function()
\r
552 editor.fire( 'dataReady' );
\r
556 * IE BUG: IE might have rendered the iframe with invisible contents.
\r
557 * (#3623). Push some inconsequential CSS style changes to force IE to
\r
560 * Also, for some unknown reasons, short timeouts (e.g. 100ms) do not
\r
561 * fix the problem. :(
\r
563 if ( CKEDITOR.env.ie )
\r
565 setTimeout( function()
\r
567 if ( editor.document )
\r
569 var $body = editor.document.$.body;
\r
570 $body.runtimeStyle.marginBottom = '0px';
\r
571 $body.runtimeStyle.marginBottom = '';
\r
579 editor.addMode( 'wysiwyg',
\r
581 load : function( holderElement, data, isSnapshot )
\r
583 mainElement = holderElement;
\r
585 if ( CKEDITOR.env.ie && CKEDITOR.env.quirks )
\r
586 holderElement.setStyle( 'position', 'relative' );
\r
588 // The editor data "may be dirty" after this
\r
590 editor.mayBeDirty = true;
\r
595 this.loadSnapshotData( data );
\r
597 this.loadData( data );
\r
600 loadData : function( data )
\r
602 isLoadingData = true;
\r
604 var config = editor.config,
\r
605 fullPage = config.fullPage,
\r
606 docType = config.docType;
\r
608 // Build the additional stuff to be included into <head>.
\r
610 '<style type="text/css" cke_temp="1">' +
\r
611 editor._.styles.join( '\n' ) +
\r
614 !fullPage && ( headExtra =
\r
615 CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) +
\r
618 var baseTag = config.baseHref ? '<base href="' + config.baseHref + '" cke_temp="1" />' : '';
\r
622 // Search and sweep out the doctype declaration.
\r
623 data = data.replace( /<!DOCTYPE[^>]*>/i, function( match )
\r
625 editor.docType = docType = match;
\r
630 // Get the HTML version of the data.
\r
631 if ( editor.dataProcessor )
\r
632 data = editor.dataProcessor.toHtml( data, fixForBody );
\r
636 // Check if the <body> tag is available.
\r
637 if ( !(/<body[\s|>]/).test( data ) )
\r
638 data = '<body>' + data;
\r
640 // Check if the <html> tag is available.
\r
641 if ( !(/<html[\s|>]/).test( data ) )
\r
642 data = '<html>' + data + '</html>';
\r
644 // Check if the <head> tag is available.
\r
645 if ( !(/<head[\s|>]/).test( data ) )
\r
646 data = data.replace( /<html[^>]*>/, '$&<head><title></title></head>' ) ;
\r
648 // The base must be the first tag in the HEAD, e.g. to get relative
\r
649 // links on styles.
\r
650 baseTag && ( data = data.replace( /<head>/, '$&' + baseTag ) );
\r
652 // Inject the extra stuff into <head>.
\r
653 // Attention: do not change it before testing it well. (V2)
\r
654 // This is tricky... if the head ends with <meta ... content type>,
\r
655 // Firefox will break. But, it works if we place our extra stuff as
\r
656 // the last elements in the HEAD.
\r
657 data = data.replace( /<\/head\s*>/, headExtra + '$&' );
\r
659 // Add the DOCTYPE back to it.
\r
660 data = docType + data;
\r
666 '<html dir="' + config.contentsLangDirection + '">' +
\r
671 '<body' + ( config.bodyId ? ' id="' + config.bodyId + '"' : '' ) +
\r
672 ( config.bodyClass ? ' class="' + config.bodyClass + '"' : '' ) +
\r
678 data += activationScript;
\r
680 CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
\r
681 createIFrame( data );
\r
684 getData : function()
\r
686 var config = editor.config,
\r
687 fullPage = config.fullPage,
\r
688 docType = fullPage && editor.docType,
\r
689 doc = iframe.getFrameDocument();
\r
691 var data = fullPage
\r
692 ? doc.getDocumentElement().getOuterHtml()
\r
693 : doc.getBody().getHtml();
\r
695 if ( editor.dataProcessor )
\r
696 data = editor.dataProcessor.toDataFormat( data, fixForBody );
\r
698 // Strip the last blank paragraph within document.
\r
699 if ( config.ignoreEmptyParagraph )
\r
700 data = data.replace( emptyParagraphRegexp, '' );
\r
703 data = docType + '\n' + data;
\r
708 getSnapshotData : function()
\r
710 return iframe.getFrameDocument().getBody().getHtml();
\r
713 loadSnapshotData : function( data )
\r
715 iframe.getFrameDocument().getBody().setHtml( data );
\r
718 unload : function( holderElement )
\r
720 editor.window = editor.document = iframe = mainElement = isPendingFocus = null;
\r
722 editor.fire( 'contentDomUnload' );
\r
727 if ( isLoadingData )
\r
728 isPendingFocus = true;
\r
729 else if ( editor.window )
\r
731 editor.window.focus();
\r
733 // Force the selection to happen, in this way
\r
734 // we guarantee the focus will be there. (#4848)
\r
735 if ( CKEDITOR.env.ie )
\r
739 var sel = editor.getSelection();
\r
740 sel = sel && sel.getNative();
\r
741 var range = sel && sel.type && sel.createRange();
\r
751 editor.selectionChange();
\r
756 editor.on( 'insertHtml', onInsertHtml, null, null, 20 );
\r
757 editor.on( 'insertElement', onInsertElement, null, null, 20 );
\r
758 // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189)
\r
759 editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 );
\r
762 // Create an invisible element to grab focus.
\r
763 if ( CKEDITOR.env.ie )
\r
765 var ieFocusGrabber;
\r
766 editor.on( 'uiReady', function()
\r
768 ieFocusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml(
\r
769 '<input tabindex="-1" style="position:absolute; left:-10000">' ) );
\r
771 ieFocusGrabber.on( 'focus', function()
\r
780 // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514)
\r
781 if ( CKEDITOR.env.gecko )
\r
785 var body = document.body;
\r
788 window.addEventListener( 'load', arguments.callee, false );
\r
791 body.setAttribute( 'onpageshow', body.getAttribute( 'onpageshow' )
\r
792 + ';event.persisted && CKEDITOR.tools.callFunction(' +
\r
793 CKEDITOR.tools.addFunction( function()
\r
795 var allInstances = CKEDITOR.instances,
\r
798 for ( var i in allInstances )
\r
800 editor = allInstances[ i ];
\r
801 doc = editor.document;
\r
804 doc.$.designMode = 'off';
\r
805 doc.$.designMode = 'on';
\r
816 * Disables the ability of resize objects (image and tables) in the editing
\r
821 * config.disableObjectResizing = true;
\r
823 CKEDITOR.config.disableObjectResizing = false;
\r
826 * Disables the "table tools" offered natively by the browser (currently
\r
827 * Firefox only) to make quick table editing operations, like adding or
\r
828 * deleting rows and columns.
\r
832 * config.disableNativeTableHandles = false;
\r
834 CKEDITOR.config.disableNativeTableHandles = true;
\r
837 * Disables the built-in spell checker while typing natively available in the
\r
838 * browser (currently Firefox and Safari only).<br /><br />
\r
840 * Even if word suggestions will not appear in the CKEditor context menu, this
\r
841 * feature is useful to help quickly identifying misspelled words.<br /><br />
\r
843 * This setting is currently compatible with Firefox only due to limitations in
\r
848 * config.disableNativeSpellChecker = false;
\r
850 CKEDITOR.config.disableNativeSpellChecker = true;
\r
853 * Whether the editor must output an empty value ("") if it's contents is made
\r
854 * by an empty paragraph only.
\r
858 * config.ignoreEmptyParagraph = false;
\r
860 CKEDITOR.config.ignoreEmptyParagraph = true;
\r
863 * Fired when data is loaded and ready for retrieval in an editor instance.
\r
864 * @name CKEDITOR.editor#dataReady
\r