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 var frameLabel = editor.lang.editorTitle.replace( '%1', editor.name );
\r
246 editor.on( 'editingBlockReady', function()
\r
256 // Support for custom document.domain in IE.
\r
257 var isCustomDomain = CKEDITOR.env.isCustomDomain();
\r
259 // Creates the iframe that holds the editable document.
\r
260 var createIFrame = function( data )
\r
267 var setDataFn = !CKEDITOR.env.gecko && CKEDITOR.tools.addFunction( function( doc )
\r
269 CKEDITOR.tools.removeFunction( setDataFn );
\r
274 'document.open();' +
\r
276 // The document domain must be set any time we
\r
277 // call document.open().
\r
278 ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) +
\r
280 // With FF, it's better to load the data on
\r
281 // iframe.load. (#3894,#4058)
\r
282 // But in FF, we still need the open()-close() call
\r
283 // to avoid HTTPS warnings.
\r
284 ( CKEDITOR.env.gecko ? '' : ( 'parent.CKEDITOR.tools.callFunction(' + setDataFn + ',document);' ) ) +
\r
286 'document.close();';
\r
288 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' +
\r
289 ' style="width:100%;height:100%"' +
\r
290 ' frameBorder="0"' +
\r
291 ' src="javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())"' +
\r
292 ' tabIndex="' + editor.tabIndex + '"' +
\r
293 ' allowTransparency="true"' +
\r
296 // With FF, it's better to load the data on iframe.load. (#3894,#4058)
\r
297 CKEDITOR.env.gecko && iframe.on( 'load', function( ev )
\r
299 ev.removeListener();
\r
301 var doc = iframe.getFrameDocument().$;
\r
308 mainElement.append( iframe );
\r
311 // The script that launches the bootstrap logic on 'domReady', so the document
\r
312 // is fully editable even before the editing iframe is fully loaded (#4455).
\r
313 var activationScript =
\r
314 '<script id="cke_actscrpt" type="text/javascript" cke_temp="1">' +
\r
315 ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) +
\r
316 'parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
\r
319 // Editing area bootstrap code.
\r
320 var contentDomReady = function( domWindow )
\r
326 editor.fire( 'ariaWidget', iframe );
\r
328 var domDocument = domWindow.document,
\r
329 body = domDocument.body;
\r
331 // Remove this script from the DOM.
\r
332 var script = domDocument.getElementById( "cke_actscrpt" );
\r
333 script.parentNode.removeChild( script );
\r
335 delete CKEDITOR._[ 'contentDomReady' + editor.name ];
\r
337 body.spellcheck = !editor.config.disableNativeSpellChecker;
\r
339 if ( CKEDITOR.env.ie )
\r
341 // Don't display the focus border.
\r
342 body.hideFocus = true;
\r
344 // Disable and re-enable the body to avoid IE from
\r
345 // taking the editing focus at startup. (#141 / #523)
\r
346 body.disabled = true;
\r
347 body.contentEditable = true;
\r
348 body.removeAttribute( 'disabled' );
\r
351 domDocument.designMode = 'on';
\r
353 // IE, Opera and Safari may not support it and throw
\r
355 try { domDocument.execCommand( 'enableObjectResizing', false, !editor.config.disableObjectResizing ) ; } catch(e) {}
\r
356 try { domDocument.execCommand( 'enableInlineTableEditing', false, !editor.config.disableNativeTableHandles ) ; } catch(e) {}
\r
358 domWindow = editor.window = new CKEDITOR.dom.window( domWindow );
\r
359 domDocument = editor.document = new CKEDITOR.dom.document( domDocument );
\r
361 // Gecko/Webkit need some help when selecting control type elements. (#3448)
\r
362 if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera) )
\r
364 domDocument.on( 'mousedown', function( ev )
\r
366 var control = ev.data.getTarget();
\r
367 if ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) )
\r
368 editor.getSelection().selectElement( control );
\r
372 // Webkit: avoid from editing form control elements content.
\r
373 if ( CKEDITOR.env.webkit )
\r
375 // Prevent from tick checkbox/radiobox/select
\r
376 domDocument.on( 'click', function( ev )
\r
378 if ( ev.data.getTarget().is( 'input', 'select' ) )
\r
379 ev.data.preventDefault();
\r
382 // Prevent from editig textfield/textarea value.
\r
383 domDocument.on( 'mouseup', function( ev )
\r
385 if ( ev.data.getTarget().is( 'input', 'textarea' ) )
\r
386 ev.data.preventDefault();
\r
390 // IE standard compliant in editing frame doesn't focus the editor when
\r
391 // clicking outside actual content, manually apply the focus. (#1659)
\r
392 if ( CKEDITOR.env.ie
\r
393 && domDocument.$.compatMode == 'CSS1Compat' )
\r
395 var htmlElement = domDocument.getDocumentElement();
\r
396 htmlElement.on( 'mousedown', function( evt )
\r
398 // Setting focus directly on editor doesn't work, we
\r
399 // have to use here a temporary element to 'redirect'
\r
401 if ( evt.data.getTarget().equals( htmlElement ) )
\r
402 ieFocusGrabber.focus();
\r
406 var focusTarget = ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) ?
\r
407 domWindow : domDocument;
\r
409 focusTarget.on( 'blur', function()
\r
411 editor.focusManager.blur();
\r
414 focusTarget.on( 'focus', function()
\r
416 // Gecko need a key event to 'wake up' the editing
\r
417 // ability when document is empty.(#3864)
\r
418 if ( CKEDITOR.env.gecko )
\r
421 while ( first.firstChild )
\r
422 first = first.firstChild;
\r
424 if ( !first.nextSibling
\r
425 && ( 'BR' == first.tagName )
\r
426 && first.hasAttribute( '_moz_editor_bogus_node' ) )
\r
428 var keyEventSimulate = domDocument.$.createEvent( "KeyEvents" );
\r
429 keyEventSimulate.initKeyEvent( 'keypress', true, true, domWindow.$, false,
\r
430 false, false, false, 0, 32 );
\r
431 domDocument.$.dispatchEvent( keyEventSimulate );
\r
432 var bogusText = domDocument.getBody().getFirst() ;
\r
433 // Compensate the line maintaining <br> if enterMode is not block.
\r
434 if ( editor.config.enterMode == CKEDITOR.ENTER_BR )
\r
435 domDocument.createElement( 'br', { attributes: { '_moz_dirty' : "" } } )
\r
436 .replace( bogusText );
\r
438 bogusText.remove();
\r
442 editor.focusManager.focus();
\r
445 var keystrokeHandler = editor.keystrokeHandler;
\r
446 if ( keystrokeHandler )
\r
447 keystrokeHandler.attach( domDocument );
\r
449 if ( CKEDITOR.env.ie )
\r
451 // Override keystrokes which should have deletion behavior
\r
452 // on control types in IE . (#4047)
\r
453 domDocument.on( 'keydown', function( evt )
\r
455 var keyCode = evt.data.getKeystroke();
\r
457 // Backspace OR Delete.
\r
458 if ( keyCode in { 8 : 1, 46 : 1 } )
\r
460 var sel = editor.getSelection(),
\r
461 control = sel.getSelectedElement();
\r
465 // Make undo snapshot.
\r
466 editor.fire( 'saveSnapshot' );
\r
468 // Delete any element that 'hasLayout' (e.g. hr,table) in IE8 will
\r
469 // break up the selection, safely manage it here. (#4795)
\r
470 var bookmark = sel.getRanges()[ 0 ].createBookmark();
\r
471 // Remove the control manually.
\r
473 sel.selectBookmarks( [ bookmark ] );
\r
475 editor.fire( 'saveSnapshot' );
\r
477 evt.data.preventDefault();
\r
482 // PageUp/PageDown scrolling is broken in document
\r
483 // with standard doctype, manually fix it. (#4736)
\r
484 if ( domDocument.$.compatMode == 'CSS1Compat' )
\r
486 var pageUpDownKeys = { 33 : 1, 34 : 1 };
\r
487 domDocument.on( 'keydown', function( evt )
\r
489 if ( evt.data.getKeystroke() in pageUpDownKeys )
\r
491 setTimeout( function ()
\r
493 editor.getSelection().scrollIntoView();
\r
500 // Adds the document body as a context menu target.
\r
501 if ( editor.contextMenu )
\r
502 editor.contextMenu.addTarget( domDocument, editor.config.browserContextMenuOnCtrl !== false );
\r
504 setTimeout( function()
\r
506 editor.fire( 'contentDom' );
\r
510 editor.mode = 'wysiwyg';
\r
511 editor.fire( 'mode' );
\r
515 isLoadingData = false;
\r
517 if ( isPendingFocus )
\r
520 isPendingFocus = false;
\r
522 setTimeout( function()
\r
524 editor.fire( 'dataReady' );
\r
528 * IE BUG: IE might have rendered the iframe with invisible contents.
\r
529 * (#3623). Push some inconsequential CSS style changes to force IE to
\r
532 * Also, for some unknown reasons, short timeouts (e.g. 100ms) do not
\r
533 * fix the problem. :(
\r
535 if ( CKEDITOR.env.ie )
\r
537 setTimeout( function()
\r
539 if ( editor.document )
\r
541 var $body = editor.document.$.body;
\r
542 $body.runtimeStyle.marginBottom = '0px';
\r
543 $body.runtimeStyle.marginBottom = '';
\r
551 editor.addMode( 'wysiwyg',
\r
553 load : function( holderElement, data, isSnapshot )
\r
555 mainElement = holderElement;
\r
557 if ( CKEDITOR.env.ie && CKEDITOR.env.quirks )
\r
558 holderElement.setStyle( 'position', 'relative' );
\r
560 // The editor data "may be dirty" after this
\r
562 editor.mayBeDirty = true;
\r
567 this.loadSnapshotData( data );
\r
569 this.loadData( data );
\r
572 loadData : function( data )
\r
574 isLoadingData = true;
\r
576 var config = editor.config,
\r
577 fullPage = config.fullPage,
\r
578 docType = config.docType;
\r
580 // Build the additional stuff to be included into <head>.
\r
582 '<style type="text/css" cke_temp="1">' +
\r
583 editor._.styles.join( '\n' ) +
\r
586 !fullPage && ( headExtra =
\r
587 CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) +
\r
590 var baseTag = config.baseHref ? '<base href="' + config.baseHref + '" cke_temp="1" />' : '';
\r
594 // Search and sweep out the doctype declaration.
\r
595 data = data.replace( /<!DOCTYPE[^>]*>/i, function( match )
\r
597 editor.docType = docType = match;
\r
602 // Get the HTML version of the data.
\r
603 if ( editor.dataProcessor )
\r
604 data = editor.dataProcessor.toHtml( data, fixForBody );
\r
608 // Check if the <body> tag is available.
\r
609 if ( !(/<body[\s|>]/).test( data ) )
\r
610 data = '<body>' + data;
\r
612 // Check if the <html> tag is available.
\r
613 if ( !(/<html[\s|>]/).test( data ) )
\r
614 data = '<html>' + data + '</html>';
\r
616 // Check if the <head> tag is available.
\r
617 if ( !(/<head[\s|>]/).test( data ) )
\r
618 data = data.replace( /<html[^>]*>/, '$&<head><title></title></head>' ) ;
\r
620 // The base must be the first tag in the HEAD, e.g. to get relative
\r
621 // links on styles.
\r
622 baseTag && ( data = data.replace( /<head>/, '$&' + baseTag ) );
\r
624 // Inject the extra stuff into <head>.
\r
625 // Attention: do not change it before testing it well. (V2)
\r
626 // This is tricky... if the head ends with <meta ... content type>,
\r
627 // Firefox will break. But, it works if we place our extra stuff as
\r
628 // the last elements in the HEAD.
\r
629 data = data.replace( /<\/head\s*>/, headExtra + '$&' );
\r
631 // Add the DOCTYPE back to it.
\r
632 data = docType + data;
\r
638 '<html dir="' + config.contentsLangDirection + '">' +
\r
639 '<title>' + frameLabel + '</title>' +
\r
644 '<body' + ( config.bodyId ? ' id="' + config.bodyId + '"' : '' ) +
\r
645 ( config.bodyClass ? ' class="' + config.bodyClass + '"' : '' ) +
\r
651 data += activationScript;
\r
653 CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
\r
654 createIFrame( data );
\r
657 getData : function()
\r
659 var config = editor.config,
\r
660 fullPage = config.fullPage,
\r
661 docType = fullPage && editor.docType,
\r
662 doc = iframe.getFrameDocument();
\r
664 var data = fullPage
\r
665 ? doc.getDocumentElement().getOuterHtml()
\r
666 : doc.getBody().getHtml();
\r
668 if ( editor.dataProcessor )
\r
669 data = editor.dataProcessor.toDataFormat( data, fixForBody );
\r
671 // Strip the last blank paragraph within document.
\r
672 if ( config.ignoreEmptyParagraph )
\r
673 data = data.replace( emptyParagraphRegexp, '' );
\r
676 data = docType + '\n' + data;
\r
681 getSnapshotData : function()
\r
683 return iframe.getFrameDocument().getBody().getHtml();
\r
686 loadSnapshotData : function( data )
\r
688 iframe.getFrameDocument().getBody().setHtml( data );
\r
691 unload : function( holderElement )
\r
693 editor.window = editor.document = iframe = mainElement = isPendingFocus = null;
\r
695 editor.fire( 'contentDomUnload' );
\r
700 if ( isLoadingData )
\r
701 isPendingFocus = true;
\r
702 else if ( editor.window )
\r
704 editor.window.focus();
\r
706 // Force the selection to happen, in this way
\r
707 // we guarantee the focus will be there. (#4848)
\r
708 if ( CKEDITOR.env.ie )
\r
712 var sel = editor.getSelection();
\r
713 sel = sel && sel.getNative();
\r
714 var range = sel && sel.type && sel.createRange();
\r
724 editor.selectionChange();
\r
729 editor.on( 'insertHtml', onInsertHtml, null, null, 20 );
\r
730 editor.on( 'insertElement', onInsertElement, null, null, 20 );
\r
731 // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189)
\r
732 editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 );
\r
736 // Setting voice label as window title, backup the original one
\r
737 // and restore it before running into use.
\r
738 editor.on( 'contentDom', function ()
\r
740 var title = editor.document.getElementsByTag( 'title' ).getItem( 0 );
\r
741 title.setAttribute( '_cke_title', editor.document.$.title );
\r
742 editor.document.$.title = frameLabel;
\r
746 // Create an invisible element to grab focus.
\r
747 if ( CKEDITOR.env.ie )
\r
749 var ieFocusGrabber;
\r
750 editor.on( 'uiReady', function()
\r
752 ieFocusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml(
\r
753 // Use 'span' instead of anything else to fly under the screen-reader radar. (#5049)
\r
754 '<span tabindex="-1" style="position:absolute; left:-10000" role="presentation"></span>' ) );
\r
756 ieFocusGrabber.on( 'focus', function()
\r
765 // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514)
\r
766 if ( CKEDITOR.env.gecko )
\r
770 var body = document.body;
\r
773 window.addEventListener( 'load', arguments.callee, false );
\r
776 body.setAttribute( 'onpageshow', body.getAttribute( 'onpageshow' )
\r
777 + ';event.persisted && CKEDITOR.tools.callFunction(' +
\r
778 CKEDITOR.tools.addFunction( function()
\r
780 var allInstances = CKEDITOR.instances,
\r
783 for ( var i in allInstances )
\r
785 editor = allInstances[ i ];
\r
786 doc = editor.document;
\r
789 doc.$.designMode = 'off';
\r
790 doc.$.designMode = 'on';
\r
801 * Disables the ability of resize objects (image and tables) in the editing
\r
806 * config.disableObjectResizing = true;
\r
808 CKEDITOR.config.disableObjectResizing = false;
\r
811 * Disables the "table tools" offered natively by the browser (currently
\r
812 * Firefox only) to make quick table editing operations, like adding or
\r
813 * deleting rows and columns.
\r
817 * config.disableNativeTableHandles = false;
\r
819 CKEDITOR.config.disableNativeTableHandles = true;
\r
822 * Disables the built-in spell checker while typing natively available in the
\r
823 * browser (currently Firefox and Safari only).<br /><br />
\r
825 * Even if word suggestions will not appear in the CKEditor context menu, this
\r
826 * feature is useful to help quickly identifying misspelled words.<br /><br />
\r
828 * This setting is currently compatible with Firefox only due to limitations in
\r
833 * config.disableNativeSpellChecker = false;
\r
835 CKEDITOR.config.disableNativeSpellChecker = true;
\r
838 * Whether the editor must output an empty value ("") if it's contents is made
\r
839 * by an empty paragraph only.
\r
843 * config.ignoreEmptyParagraph = false;
\r
845 CKEDITOR.config.ignoreEmptyParagraph = true;
\r
848 * Fired when data is loaded and ready for retrieval in an editor instance.
\r
849 * @name CKEDITOR.editor#dataReady
\r