Skip to content

Commit

Permalink
Merge stable into master
Browse files Browse the repository at this point in the history
  • Loading branch information
CKEditorBot authored Jan 18, 2021
2 parents 8486251 + 970851f commit 9dee4a3
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The {@link module:core/editor/editor~Editor `Editor`} class is a base to impleme

Plugins are a way to introduce editor features. In CKEditor 5 even {@link module:typing/typing~Typing typing} is a plugin. What is more, the {@link module:typing/typing~Typing} plugin depends on the {@link module:typing/input~Input} and {@link module:typing/delete~Delete} plugins which are responsible for handling the methods of inserting text and deleting content, respectively. At the same time, some plugins need to customize <kbd>Backspace</kbd> behavior in certain cases and handle it by themselves. This leaves the base plugins free of any non-generic knowledge.

Another important aspect of how existing CKEditor 5 plugins are implemented is the split into engine and UI parts. For example, the {@link module:basic-styles/bold/boldediting~BoldEditing} plugin introduces the schema definition, mechanisms rendering `<strong>` tags, commands to apply and remove bold from text, while the {@link module:basic-styles/bold/boldui~BoldUI} plugin adds the UI of the feature (i.e. the button). This feature split is meant to allow for greater reuse (one can take the engine part and implement their own UI for a feature) as well as for running CKEditor 5 on the server side. Finally, there's the {@link module:basic-styles/bold~Bold} plugin that brings both plugins for a full experience.
Another important aspect of how existing CKEditor 5 plugins are implemented is the split into engine and UI parts. For example, the {@link module:basic-styles/bold/boldediting~BoldEditing} plugin introduces the schema definition, mechanisms rendering `<strong>` tags, commands to apply and remove bold from text, while the {@link module:basic-styles/bold/boldui~BoldUI} plugin adds the UI of the feature (i.e. the button). This feature split is meant to allow for greater reuse (one can take the engine part and implement their own UI for a feature) as well as for running CKEditor 5 on the server side. Finally, there is the {@link module:basic-styles/bold~Bold} plugin that brings both plugins for a full experience.

The tl;dr of this is that:

Expand Down
6 changes: 3 additions & 3 deletions packages/ckeditor5-cloud-services/src/cloudservices.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class CloudServices extends ContextPlugin {
}

/**
* Map of `Token` object instances keyed by `tokenUrl`s.
* A map of token object instances keyed by the token URLs.
*
* @private
* @type {Map.<String, module:cloud-services-core/token~Token>}
Expand Down Expand Up @@ -91,7 +91,7 @@ export default class CloudServices extends ContextPlugin {
* @returns {Promise.<module:cloud-services-core/token~Token>}
*/
registerTokenUrl( tokenUrl ) {
// Reuse Token instance in case of multiple features using the same tokenUrl.
// Reuse the token instance in case of multiple features using the same token URL.
if ( this._tokens.has( tokenUrl ) ) {
return Promise.resolve( this.getTokenFor( tokenUrl ) );
}
Expand All @@ -114,7 +114,7 @@ export default class CloudServices extends ContextPlugin {

if ( !token ) {
/**
* Provided `tokenUrl` was not registered by {@link module:cloud-services/cloudservices~CloudServices#registerTokenUrl}.
* The provided `tokenUrl` was not registered by {@link module:cloud-services/cloudservices~CloudServices#registerTokenUrl}.
*
* @error cloudservices-token-not-registered
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/ckeditor5-core/src/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ export default class Editor {
/**
* Focuses the editor.
*
* **Note** To explicitly focus the editing area of the editor, use
* **Note** To explicitly focus the editing area of the editor, use the
* {@link module:engine/view/view~View#focus `editor.editing.view.focus()`} method of the editing view.
*
* Check out the {@glink framework/guides/deep-dive/ui/focus-tracking#focus-in-the-editor-ui "Focus in the editor ui"} section
* of the {@glink framework/guides/deep-dive/ui/focus-tracking "Deep dive into focus tracking" guide} to learn more.
* Check out the {@glink framework/guides/deep-dive/ui/focus-tracking#focus-in-the-editor-ui Focus in the editor UI} section
* of the {@glink framework/guides/deep-dive/ui/focus-tracking Deep dive into focus tracking} guide to learn more.
*/
focus() {
this.editing.view.focus();
Expand Down
10 changes: 5 additions & 5 deletions packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ export default class HtmlDataProcessor {
}

/**
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as a raw data
* and not processed during conversion from DOM to view elements.
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
* and not processed during the conversion from the DOM to the view elements.
*
* The raw data can be later accessed by {@link module:engine/view/element~Element#getCustomProperty view element custom property}
* `"$rawContent"`.
* The raw data can be later accessed by a
* {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `"$rawContent"`.
*
* @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching all view elements whose content should
* be treated as a raw data.
* be treated as raw data.
*/
registerRawContentMatcher( pattern ) {
this._domConverter.registerRawContentMatcher( pattern );
Expand Down
10 changes: 5 additions & 5 deletions packages/ckeditor5-engine/src/dataprocessor/xmldataprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ export default class XmlDataProcessor {
}

/**
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as a raw data
* and not processed during conversion from XML to view elements.
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
* and not processed during the conversion from XML to view elements.
*
* The raw data can be later accessed by {@link module:engine/view/element~Element#getCustomProperty view element custom property}
* `"$rawContent"`.
* The raw data can be later accessed by a
* {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `"$rawContent"`.
*
* @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching all view elements whose content should
* be treated as a raw data.
* be treated as raw data.
*/
registerRawContentMatcher( pattern ) {
this._domConverter.registerRawContentMatcher( pattern );
Expand Down
5 changes: 3 additions & 2 deletions packages/ckeditor5-engine/src/model/documentselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,12 @@ export default class DocumentSelection {
}

/**
* Registers marker group prefix or marker name to be collected in {@link ~DocumentSelection#markers selection markers collection}.
* Registers a marker group prefix or a marker name to be collected in the
* {@link ~DocumentSelection#markers selection markers collection}.
*
* See also {@link module:engine/model/markercollection~MarkerCollection#getMarkersGroup `MarkerCollection#getMarkersGroup()`}.
*
* @param {String} prefixOrName Marker group prefix or marker name.
* @param {String} prefixOrName The marker group prefix or marker name.
*/
observeMarkers( prefixOrName ) {
this._selection.observeMarkers( prefixOrName );
Expand Down
48 changes: 24 additions & 24 deletions packages/ckeditor5-engine/src/view/domconverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ export default class DomConverter {
this._fakeSelectionMapping = new WeakMap();

/**
* Matcher for view elements whose content should be treated as a raw data
* and not processed during conversion from DOM nodes to view elements.
* Matcher for view elements whose content should be treated as raw data
* and not processed during the conversion from DOM nodes to view elements.
*
* @private
* @type {module:engine/view/matcher~Matcher}
*/
this._rawContentElementMatcher = new Matcher();

/**
* Set of encountered raw content DOM nodes. It is used for preventing left trimming of the following text node.
* A set of encountered raw content DOM nodes. It is used for preventing left trimming of the following text node.
*
* @private
* @type {WeakSet.<Node>}
Expand All @@ -139,9 +139,9 @@ export default class DomConverter {
}

/**
* Binds given DOM element that represents fake selection to a **position** of a
* Binds a given DOM element that represents fake selection to a **position** of a
* {@link module:engine/view/documentselection~DocumentSelection document selection}.
* Document selection copy is stored and can be retrieved by
* Document selection copy is stored and can be retrieved by the
* {@link module:engine/view/domconverter~DomConverter#fakeSelectionToView} method.
*
* @param {HTMLElement} domElement
Expand All @@ -152,8 +152,8 @@ export default class DomConverter {
}

/**
* Returns {@link module:engine/view/selection~Selection view selection} instance corresponding to
* given DOM element that represents fake selection. Returns `undefined` if binding to given DOM element does not exists.
* Returns a {@link module:engine/view/selection~Selection view selection} instance corresponding to a given
* DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.
*
* @param {HTMLElement} domElement
* @returns {module:engine/view/selection~Selection|undefined}
Expand All @@ -163,23 +163,23 @@ export default class DomConverter {
}

/**
* Binds DOM and View elements, so it will be possible to get corresponding elements using
* Binds DOM and view elements, so it will be possible to get corresponding elements using
* {@link module:engine/view/domconverter~DomConverter#mapDomToView} and
* {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.
*
* @param {HTMLElement} domElement DOM element to bind.
* @param {module:engine/view/element~Element} viewElement View element to bind.
* @param {HTMLElement} domElement The DOM element to bind.
* @param {module:engine/view/element~Element} viewElement The view element to bind.
*/
bindElements( domElement, viewElement ) {
this._domToViewMapping.set( domElement, viewElement );
this._viewToDomMapping.set( viewElement, domElement );
}

/**
* Unbinds given `domElement` from the view element it was bound to. Unbinding is deep, meaning that all children of
* `domElement` will be unbound too.
* Unbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of
* the DOM element will be unbound too.
*
* @param {HTMLElement} domElement DOM element to unbind.
* @param {HTMLElement} domElement The DOM element to unbind.
*/
unbindDomElement( domElement ) {
const viewElement = this._domToViewMapping.get( domElement );
Expand All @@ -195,21 +195,21 @@ export default class DomConverter {
}

/**
* Binds DOM and View document fragments, so it will be possible to get corresponding document fragments using
* Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using
* {@link module:engine/view/domconverter~DomConverter#mapDomToView} and
* {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.
*
* @param {DocumentFragment} domFragment DOM document fragment to bind.
* @param {module:engine/view/documentfragment~DocumentFragment} viewFragment View document fragment to bind.
* @param {DocumentFragment} domFragment The DOM document fragment to bind.
* @param {module:engine/view/documentfragment~DocumentFragment} viewFragment The view document fragment to bind.
*/
bindDocumentFragments( domFragment, viewFragment ) {
this._domToViewMapping.set( domFragment, viewFragment );
this._viewToDomMapping.set( viewFragment, domFragment );
}

/**
* Converts view to DOM. For all text nodes, not bound elements and document fragments new items will
* be created. For bound elements and document fragments function will return corresponding items.
* Converts the view to the DOM. For all text nodes, not bound elements and document fragments new items will
* be created. For bound elements and document fragments the method will return corresponding items.
*
* @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} viewNode
* View node or document fragment to transform.
Expand Down Expand Up @@ -940,16 +940,16 @@ export default class DomConverter {
}

/**
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as a raw data
* and not processed during conversion from DOM nodes to view elements.
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
* and not processed during the conversion from DOM nodes to view elements.
*
* This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and
* {@link module:engine/view/domconverter~DomConverter#domChildrenToView} processes DOM nodes.
* {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.
*
* The raw data can be later accessed by {@link module:engine/view/element~Element#getCustomProperty view element custom property}
* `"$rawContent"`.
* The raw data can be later accessed by a
* {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `"$rawContent"`.
*
* @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching view element which content should
* @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching view element whose content should
* be treated as a raw data.
*/
registerRawContentMatcher( pattern ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-engine/src/view/observer/observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class Observer {
this.document = view.document;

/**
* State of the observer. If it is disabled no events will be fired.
* The state of the observer. If it is disabled, no events will be fired.
*
* @readonly
* @member {Boolean}
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-image/docs/features/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The [`@ckeditor/ckeditor5-image`](https://www.npmjs.com/package/@ckeditor/ckedit
* {@link module:image/imagetextalternative~ImageTextAlternative} adds support for adding text alternative.
* {@link module:image/imageupload~ImageUpload} adds support for {@link features/image-upload uploading dropped or pasted images}.
* {@link module:image/imageinsert~ImageInsert} adds support for [inserting images via URL](#inserting-images-via-source-url) and other custom integrations.
* {@link module:image/autoimage~AutoImage} adds support for [inserting images via pasting URL into editor](#inserting-images-via-pasting-url-into-editor).
* {@link module:image/autoimage~AutoImage} adds support for [inserting images via pasting a URL into the editor](#inserting-images-via-pasting-url-into-editor).
* {@link module:image/imageresize~ImageResize} adds support for [resizing images](#resizing-images).
* {@link module:link/linkimage~LinkImage} adds support for [linking images](#linking-images).

Expand Down Expand Up @@ -108,7 +108,7 @@ This will add a new **Insert image** dropdown in the toolbar. To open the panel

## Inserting images via pasting URL into editor

The {@link module:image/autoimage~AutoImage} plugin recognizes image links in the pasted content and embeds them shortly after they are injected into the document to speed up the editing. Accepted image extensions: jpg, jpeg, png, gif, ico.
The {@link module:image/autoimage~AutoImage} plugin recognizes image links in the pasted content and embeds them shortly after they are injected into the document to speed up the editing. Accepted image extensions are: `jpg`, `jpeg`, `png`, `gif`, `ico`.

<info-box>
The image URL must be the only content pasted to be properly embedded. Multiple links (`"http://image.url http://another.image.url"`) as well as bigger chunks of content (`"This link http://image.url will not be auto–embedded when pasted."`) are ignored.
Expand Down
12 changes: 6 additions & 6 deletions packages/ckeditor5-markdown-gfm/src/gfmdataprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ export default class GFMDataProcessor {
}

/**
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as a raw data
* and not processed during conversion from Markdown to view elements.
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
* and not processed during the conversion from Markdown to view elements.
*
* The raw data can be later accessed by {@link module:engine/view/element~Element#getCustomProperty view element custom property}
* `"$rawContent"`.
* The raw data can be later accessed by a
* {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `"$rawContent"`.
*
* @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching all view elements whose content should
* be treated as a raw data.
* @param {module:engine/view/matcher~MatcherPattern} pattern The pattern matching all view elements whose content should
* be treated as raw data.
*/
registerRawContentMatcher( pattern ) {
this._htmlDP.registerRawContentMatcher( pattern );
Expand Down
12 changes: 6 additions & 6 deletions packages/ckeditor5-table/src/converters/upcasttable.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { createEmptyTableCell } from '../utils/common';

/**
* View the table element to model the table element conversion helper.
* View table element to model table element conversion helper.
*
* This conversion helper converts the table element as well as table rows.
*
Expand Down Expand Up @@ -64,13 +64,13 @@ export default function upcastTable() {
}

/**
* A conversion helper that skips empty <tr> from upcasting at the beginning of the table.
* A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.
*
* AN empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells
* and empty TR-s are used to maintain table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only rows
* that have related `tableRow` elements).
* An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells
* and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only
* rows that have related `tableRow` elements).
*
* *Note:* Only the first empty rows are removed because those have no meaning and it solves the issue
* *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue
* of an improper table with all empty rows.
*
* @returns {Function} Conversion helper.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* when the view is first displayed but they should work normally in other cases.
*
* The methods to control the CSS transitions are:
* * `disableCssTransitions()` – adds the `.ck-transitions-disabled` class to the
* {@link module:ui/view~View#element view element},
* * `enableCssTransitions()` – removes the `.ck-transitions-disabled` class from the
* * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the
* {@link module:ui/view~View#element view element}.
* * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the
* {@link module:ui/view~View#element view element}.
*
* **Note**: This helper extends the {@link module:ui/view~View#template template} and must be used **after**
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-ui/src/inputtext/inputtextview.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default class InputTextView extends View {
this.set( 'ariaDescribedById' );

/**
* Stores the information about the editor UI focus and propagates it so various plugins and components
* Stores information about the editor UI focus and propagates it so various plugins and components
* are unified as a focus group.
*
* @readonly
Expand All @@ -84,7 +84,7 @@ export default class InputTextView extends View {

/**
* An observable flag set to `true` when the input is currently focused by the user.
* `false` otherwise.
* Set to `false` otherwise.
*
* @readonly
* @observable
Expand Down
Loading

0 comments on commit 9dee4a3

Please sign in to comment.