Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: CKEditor 4.5 API corrections.
  • Loading branch information
AnnaTomanek committed Jun 9, 2015
1 parent 884e43a commit ab16bc5
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 129 deletions.
12 changes: 6 additions & 6 deletions core/editable.js
Expand Up @@ -271,8 +271,8 @@
*
* @param {String} data The HTML to be inserted.
* @param {String} [mode='html'] See {@link CKEDITOR.editor#method-insertHtml}'s param.
* @param {CKEDITOR.dom.range} [range] If specified the HTML will be inserted into the range
* instead of into the selection. The selection will be placed at the end of insertion (like in the normal case).
* @param {CKEDITOR.dom.range} [range] If specified, the HTML will be inserted into the range
* instead of into the selection. The selection will be placed at the end of the insertion (like in the normal case).
* Introduced in CKEditor 4.5.
*/
insertHtml: function( data, mode, range ) {
Expand Down Expand Up @@ -653,16 +653,16 @@
},

/**
* A base of the {@link CKEDITOR.editor#extractSelectedHtml} method.
* The base of the {@link CKEDITOR.editor#extractSelectedHtml} method.
*
* **Note:** The range is modified so it matches desired selection after extraction.
* But the selection is not made.
* **Note:** The range is modified so it matches the desired selection after extraction
* although the selection is not made.
*
* @since 4.5
* @param {CKEDITOR.dom.range} range
* @param {Boolean} [removeEmptyBlock=false] See {@link CKEDITOR.editor#extractSelectedHtml}'s parameter.
* Note that the range will not be modified if this parameter is set to `true`.
* @returns {CKEDITOR.dom.documentFragment} The extracted fragment of the editable contents.
* @returns {CKEDITOR.dom.documentFragment} The extracted fragment of the editable content.
*/
extractHtmlFromRange: function( range, removeEmptyBlock ) {
var helpers = extractHtmlFromRangeHelpers,
Expand Down
14 changes: 7 additions & 7 deletions core/editor.js
Expand Up @@ -1031,7 +1031,7 @@
* CKEDITOR.instances.editor1.insertHtml( '<p>This is a new paragraph.</p>' );
*
* Fires the {@link #event-insertHtml} and {@link #event-afterInsertHtml} events. The HTML is inserted
* in {@link #event-insertHtml} event's listener with a default priority (10) so you can add listeners with
* in the {@link #event-insertHtml} event's listener with a default priority (10) so you can add listeners with
* lower or higher priorities in order to execute some code before or after the HTML is inserted.
*
* @param {String} html HTML code to be inserted into the editor.
Expand All @@ -1043,8 +1043,8 @@
* the selected position. This mode should be used when inserting "htmlified" plain text
* (HTML without inline styles and styling elements like `<b>`, `<strong>`, `<span style="...">`).
*
* @param {CKEDITOR.dom.range} [range] If specified the HTML will be inserted into the range
* instead of into the selection. The selection will be placed at the end of insertion (like in the normal case).
* @param {CKEDITOR.dom.range} [range] If specified, the HTML will be inserted into the range
* instead of into the selection. The selection will be placed at the end of the insertion (like in the normal case).
* Introduced in CKEditor 4.5.
*/
insertHtml: function( html, mode, range ) {
Expand Down Expand Up @@ -1126,7 +1126,7 @@

/**
* Gets the selected HTML (it is returned as a {@link CKEDITOR.dom.documentFragment document fragment}
* or a string) and removes the selected part of the DOM. This method is designed to work as user would
* or a string) and removes the selected part of the DOM. This method is designed to work as the user would
* expect the cut and delete functionalities to work.
*
* See also:
Expand All @@ -1136,9 +1136,9 @@
*
* @since 4.5
* @param {Boolean} [toString] If `true`, then a stringified HTML will be returned.
* @param {Boolean} [removeEmptyBlock=false] Default `false` means that the function will keep empty block (if the
* whole content was removed) or it will create it (if block element was removed) and set the selection in that block.
* If `true` the empty will be removed or not created. In this case the function will not handle the selection.
* @param {Boolean} [removeEmptyBlock=false] Default `false` means that the function will keep an empty block (if the
* entire content was removed) or it will create it (if a block element was removed) and set the selection in that block.
* If `true`, the empty block will be removed or not created. In this case the function will not handle the selection.
* @returns {CKEDITOR.dom.documentFragment/String/null}
*/
extractSelectedHtml: function( toString, removeEmptyBlock ) {
Expand Down

0 comments on commit ab16bc5

Please sign in to comment.