aboutsummaryrefslogtreecommitdiff
path: root/sources/core/creators/themedui.js
diff options
context:
space:
mode:
Diffstat (limited to 'sources/core/creators/themedui.js')
-rw-r--r--sources/core/creators/themedui.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/sources/core/creators/themedui.js b/sources/core/creators/themedui.js
index c87d079..4e7a93e 100644
--- a/sources/core/creators/themedui.js
+++ b/sources/core/creators/themedui.js
@@ -1,5 +1,5 @@
1/** 1/**
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. 2 * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license 3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 */ 4 */
5 5
@@ -20,7 +20,7 @@ CKEDITOR.replaceClass = 'ckeditor';
20 * Replaces a `<textarea>` or a DOM element (`<div>`) with a CKEditor 20 * Replaces a `<textarea>` or a DOM element (`<div>`) with a CKEditor
21 * instance. For textareas, the initial value in the editor will be the 21 * instance. For textareas, the initial value in the editor will be the
22 * textarea value. For DOM elements, their `innerHTML` will be used 22 * textarea value. For DOM elements, their `innerHTML` will be used
23 * instead. We recommend using `<textarea>` and `<div>` elements only. 23 * instead. It is recommended to use `<textarea>` and `<div>` elements only.
24 * 24 *
25 * <textarea id="myfield" name="myfield"></textarea> 25 * <textarea id="myfield" name="myfield"></textarea>
26 * ... 26 * ...
@@ -79,10 +79,10 @@ CKEDITOR.replaceClass = 'ckeditor';
79 * // Replace all <textarea class="myClassName"> elements in the page. 79 * // Replace all <textarea class="myClassName"> elements in the page.
80 * CKEDITOR.replaceAll( 'myClassName' ); 80 * CKEDITOR.replaceAll( 'myClassName' );
81 * 81 *
82 * // Selectively replace <textarea> elements, based on custom assertions. 82 * // Selectively replace <textarea> elements, based on a custom evaluation function.
83 * CKEDITOR.replaceAll( function( textarea, config ) { 83 * CKEDITOR.replaceAll( function( textarea, config ) {
84 * // An assertion function that needs to be evaluated for the <textarea> 84 * // A function that needs to be evaluated for the <textarea>
85 * // to be replaced. It must explicitely return "false" to ignore a 85 * // to be replaced. It must explicitly return "false" to ignore a
86 * // specific <textarea>. 86 * // specific <textarea>.
87 * // You can also customize the editor instance by having the function 87 * // You can also customize the editor instance by having the function
88 * // modify the "config" parameter. 88 * // modify the "config" parameter.
@@ -109,7 +109,7 @@ CKEDITOR.replaceClass = 'ckeditor';
109 * </html> 109 * </html>
110 * 110 *
111 * @param {String} [className] The `<textarea>` class name. 111 * @param {String} [className] The `<textarea>` class name.
112 * @param {Function} [function] An assertion function that must return `true` for a `<textarea>` 112 * @param {Function} [evaluator] An evaluation function that must return `true` for a `<textarea>`
113 * to be replaced with the editor. If the function returns `false`, the `<textarea>` element 113 * to be replaced with the editor. If the function returns `false`, the `<textarea>` element
114 * will not be replaced. 114 * will not be replaced.
115 */ 115 */
@@ -133,7 +133,7 @@ CKEDITOR.replaceClass = 'ckeditor';
133 if ( !classRegex.test( textarea.className ) ) 133 if ( !classRegex.test( textarea.className ) )
134 continue; 134 continue;
135 } else if ( typeof arguments[ 0 ] == 'function' ) { 135 } else if ( typeof arguments[ 0 ] == 'function' ) {
136 // An assertion function could be passed as the function parameter. 136 // An evaluation function could be passed as the function parameter.
137 // It must explicitly return "false" to ignore a specific <textarea>. 137 // It must explicitly return "false" to ignore a specific <textarea>.
138 config = {}; 138 config = {};
139 if ( arguments[ 0 ]( textarea, config ) === false ) 139 if ( arguments[ 0 ]( textarea, config ) === false )
@@ -280,10 +280,10 @@ CKEDITOR.replaceClass = 'ckeditor';
280 outer = container; 280 outer = container;
281 } 281 }
282 282
283 // Set as border box width. (#5353) 283 // Set as border box width. (http://dev.ckeditor.com/ticket/5353)
284 outer.setSize( 'width', width, true ); 284 outer.setSize( 'width', width, true );
285 285
286 // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (#8348) 286 // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (http://dev.ckeditor.com/ticket/8348)
287 contentsFrame && ( contentsFrame.style.width = '1%' ); 287 contentsFrame && ( contentsFrame.style.width = '1%' );
288 288
289 // Get the height delta between the outer table and the content area. 289 // Get the height delta between the outer table and the content area.
@@ -295,7 +295,7 @@ CKEDITOR.replaceClass = 'ckeditor';
295 295
296 contents.setStyle( 'height', resultContentsHeight + 'px' ); 296 contents.setStyle( 'height', resultContentsHeight + 'px' );
297 297
298 // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (#8348) 298 // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (http://dev.ckeditor.com/ticket/8348)
299 contentsFrame && ( contentsFrame.style.width = '100%' ); 299 contentsFrame && ( contentsFrame.style.width = '100%' );
300 300
301 // Emit a resize event. 301 // Emit a resize event.
@@ -309,8 +309,8 @@ CKEDITOR.replaceClass = 'ckeditor';
309 309
310 /** 310 /**
311 * Gets the element that can be used to check the editor size. This method 311 * Gets the element that can be used to check the editor size. This method
312 * is mainly used by the `resize` plugin, which adds a UI handle that can be used 312 * is mainly used by the [Editor Resize](http://ckeditor.com/addon/resize) plugin, which adds
313 * to resize the editor. 313 * a UI handle that can be used to resize the editor.
314 * 314 *
315 * @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container. 315 * @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container.
316 * @returns {CKEDITOR.dom.element} The resizable element. 316 * @returns {CKEDITOR.dom.element} The resizable element.
@@ -337,7 +337,7 @@ CKEDITOR.replaceClass = 'ckeditor';
337 // replacement will be done later in the editor creation lifecycle. 337 // replacement will be done later in the editor creation lifecycle.
338 element.setStyle( 'visibility', 'hidden' ); 338 element.setStyle( 'visibility', 'hidden' );
339 339
340 // #8031 Remember if textarea was required and remove the attribute. 340 // http://dev.ckeditor.com/ticket/8031 Remember if textarea was required and remove the attribute.
341 editor._.required = element.hasAttribute( 'required' ); 341 editor._.required = element.hasAttribute( 'required' );
342 element.removeAttribute( 'required' ); 342 element.removeAttribute( 'required' );
343 } 343 }
@@ -422,7 +422,7 @@ CKEDITOR.replaceClass = 'ckeditor';
422 topHtml: topHtml ? '<span id="' + editor.ui.spaceId( 'top' ) + '" class="cke_top cke_reset_all" role="presentation" style="height:auto">' + topHtml + '</span>' : '', 422 topHtml: topHtml ? '<span id="' + editor.ui.spaceId( 'top' ) + '" class="cke_top cke_reset_all" role="presentation" style="height:auto">' + topHtml + '</span>' : '',
423 contentId: editor.ui.spaceId( 'contents' ), 423 contentId: editor.ui.spaceId( 'contents' ),
424 bottomHtml: bottomHtml ? '<span id="' + editor.ui.spaceId( 'bottom' ) + '" class="cke_bottom cke_reset_all" role="presentation">' + bottomHtml + '</span>' : '', 424 bottomHtml: bottomHtml ? '<span id="' + editor.ui.spaceId( 'bottom' ) + '" class="cke_bottom cke_reset_all" role="presentation">' + bottomHtml + '</span>' : '',
425 outerEl: CKEDITOR.env.ie ? 'span' : 'div' // #9571 425 outerEl: CKEDITOR.env.ie ? 'span' : 'div' // http://dev.ckeditor.com/ticket/9571
426 } ) ); 426 } ) );
427 427
428 if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) { 428 if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) {
@@ -451,7 +451,7 @@ CKEDITOR.replaceClass = 'ckeditor';
451 // Disable browser context menu for editor's chrome. 451 // Disable browser context menu for editor's chrome.
452 container.disableContextMenu(); 452 container.disableContextMenu();
453 453
454 // Redirect the focus into editor for webkit. (#5713) 454 // Redirect the focus into editor for webkit. (http://dev.ckeditor.com/ticket/5713)
455 CKEDITOR.env.webkit && container.on( 'focus', function() { 455 CKEDITOR.env.webkit && container.on( 'focus', function() {
456 editor.focus(); 456 editor.focus();
457 } ); 457 } );
@@ -467,7 +467,7 @@ CKEDITOR.replaceClass = 'ckeditor';
467 467
468/** 468/**
469 * The current editing mode. An editing mode basically provides 469 * The current editing mode. An editing mode basically provides
470 * different ways of editing or viewing the contents. 470 * different ways of editing or viewing the editor content.
471 * 471 *
472 * alert( CKEDITOR.instances.editor1.mode ); // (e.g.) 'wysiwyg' 472 * alert( CKEDITOR.instances.editor1.mode ); // (e.g.) 'wysiwyg'
473 * 473 *