/**
- * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
* Replaces a `<textarea>` or a DOM element (`<div>`) with a CKEditor
* instance. For textareas, the initial value in the editor will be the
* textarea value. For DOM elements, their `innerHTML` will be used
- * instead. We recommend using `<textarea>` and `<div>` elements only.
+ * instead. It is recommended to use `<textarea>` and `<div>` elements only.
*
* <textarea id="myfield" name="myfield"></textarea>
* ...
* // Replace all <textarea class="myClassName"> elements in the page.
* CKEDITOR.replaceAll( 'myClassName' );
*
- * // Selectively replace <textarea> elements, based on custom assertions.
+ * // Selectively replace <textarea> elements, based on a custom evaluation function.
* CKEDITOR.replaceAll( function( textarea, config ) {
- * // An assertion function that needs to be evaluated for the <textarea>
- * // to be replaced. It must explicitely return "false" to ignore a
+ * // A function that needs to be evaluated for the <textarea>
+ * // to be replaced. It must explicitly return "false" to ignore a
* // specific <textarea>.
* // You can also customize the editor instance by having the function
* // modify the "config" parameter.
* </html>
*
* @param {String} [className] The `<textarea>` class name.
- * @param {Function} [function] An assertion function that must return `true` for a `<textarea>`
+ * @param {Function} [evaluator] An evaluation function that must return `true` for a `<textarea>`
* to be replaced with the editor. If the function returns `false`, the `<textarea>` element
* will not be replaced.
*/
if ( !classRegex.test( textarea.className ) )
continue;
} else if ( typeof arguments[ 0 ] == 'function' ) {
- // An assertion function could be passed as the function parameter.
+ // An evaluation function could be passed as the function parameter.
// It must explicitly return "false" to ignore a specific <textarea>.
config = {};
if ( arguments[ 0 ]( textarea, config ) === false )
outer = container;
}
- // Set as border box width. (#5353)
+ // Set as border box width. (http://dev.ckeditor.com/ticket/5353)
outer.setSize( 'width', width, true );
- // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (#8348)
+ // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (http://dev.ckeditor.com/ticket/8348)
contentsFrame && ( contentsFrame.style.width = '1%' );
// Get the height delta between the outer table and the content area.
contents.setStyle( 'height', resultContentsHeight + 'px' );
- // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (#8348)
+ // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (http://dev.ckeditor.com/ticket/8348)
contentsFrame && ( contentsFrame.style.width = '100%' );
// Emit a resize event.
/**
* Gets the element that can be used to check the editor size. This method
- * is mainly used by the `resize` plugin, which adds a UI handle that can be used
- * to resize the editor.
+ * is mainly used by the [Editor Resize](http://ckeditor.com/addon/resize) plugin, which adds
+ * a UI handle that can be used to resize the editor.
*
* @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container.
* @returns {CKEDITOR.dom.element} The resizable element.
// replacement will be done later in the editor creation lifecycle.
element.setStyle( 'visibility', 'hidden' );
- // #8031 Remember if textarea was required and remove the attribute.
+ // http://dev.ckeditor.com/ticket/8031 Remember if textarea was required and remove the attribute.
editor._.required = element.hasAttribute( 'required' );
element.removeAttribute( 'required' );
}
topHtml: topHtml ? '<span id="' + editor.ui.spaceId( 'top' ) + '" class="cke_top cke_reset_all" role="presentation" style="height:auto">' + topHtml + '</span>' : '',
contentId: editor.ui.spaceId( 'contents' ),
bottomHtml: bottomHtml ? '<span id="' + editor.ui.spaceId( 'bottom' ) + '" class="cke_bottom cke_reset_all" role="presentation">' + bottomHtml + '</span>' : '',
- outerEl: CKEDITOR.env.ie ? 'span' : 'div' // #9571
+ outerEl: CKEDITOR.env.ie ? 'span' : 'div' // http://dev.ckeditor.com/ticket/9571
} ) );
if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) {
// Disable browser context menu for editor's chrome.
container.disableContextMenu();
- // Redirect the focus into editor for webkit. (#5713)
+ // Redirect the focus into editor for webkit. (http://dev.ckeditor.com/ticket/5713)
CKEDITOR.env.webkit && container.on( 'focus', function() {
editor.focus();
} );
/**
* The current editing mode. An editing mode basically provides
- * different ways of editing or viewing the contents.
+ * different ways of editing or viewing the editor content.
*
* alert( CKEDITOR.instances.editor1.mode ); // (e.g.) 'wysiwyg'
*