@ckeditor/ckeditor5-engine 35.0.1 → 35.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -4
- package/package.json +30 -24
- package/src/controller/datacontroller.js +467 -561
- package/src/controller/editingcontroller.js +168 -204
- package/src/conversion/conversion.js +541 -565
- package/src/conversion/conversionhelpers.js +24 -28
- package/src/conversion/downcastdispatcher.js +457 -686
- package/src/conversion/downcasthelpers.js +1583 -1965
- package/src/conversion/mapper.js +518 -707
- package/src/conversion/modelconsumable.js +240 -283
- package/src/conversion/upcastdispatcher.js +372 -718
- package/src/conversion/upcasthelpers.js +707 -818
- package/src/conversion/viewconsumable.js +524 -581
- package/src/dataprocessor/basichtmlwriter.js +12 -16
- package/src/dataprocessor/dataprocessor.js +5 -0
- package/src/dataprocessor/htmldataprocessor.js +100 -116
- package/src/dataprocessor/htmlwriter.js +1 -18
- package/src/dataprocessor/xmldataprocessor.js +116 -137
- package/src/dev-utils/model.js +260 -352
- package/src/dev-utils/operationreplayer.js +106 -126
- package/src/dev-utils/utils.js +34 -51
- package/src/dev-utils/view.js +632 -753
- package/src/index.js +0 -11
- package/src/model/batch.js +111 -127
- package/src/model/differ.js +988 -1233
- package/src/model/document.js +340 -449
- package/src/model/documentfragment.js +327 -364
- package/src/model/documentselection.js +996 -1189
- package/src/model/element.js +306 -410
- package/src/model/history.js +224 -262
- package/src/model/item.js +5 -0
- package/src/model/liveposition.js +84 -145
- package/src/model/liverange.js +108 -185
- package/src/model/markercollection.js +379 -480
- package/src/model/model.js +883 -1034
- package/src/model/node.js +419 -463
- package/src/model/nodelist.js +176 -201
- package/src/model/operation/attributeoperation.js +153 -182
- package/src/model/operation/detachoperation.js +64 -83
- package/src/model/operation/insertoperation.js +135 -166
- package/src/model/operation/markeroperation.js +114 -140
- package/src/model/operation/mergeoperation.js +163 -191
- package/src/model/operation/moveoperation.js +157 -187
- package/src/model/operation/nooperation.js +28 -38
- package/src/model/operation/operation.js +106 -125
- package/src/model/operation/operationfactory.js +30 -34
- package/src/model/operation/renameoperation.js +109 -135
- package/src/model/operation/rootattributeoperation.js +155 -188
- package/src/model/operation/splitoperation.js +196 -232
- package/src/model/operation/transform.js +1833 -2204
- package/src/model/operation/utils.js +140 -204
- package/src/model/position.js +980 -1053
- package/src/model/range.js +910 -1028
- package/src/model/rootelement.js +77 -97
- package/src/model/schema.js +1189 -1835
- package/src/model/selection.js +745 -862
- package/src/model/text.js +90 -114
- package/src/model/textproxy.js +204 -240
- package/src/model/treewalker.js +316 -397
- package/src/model/typecheckable.js +16 -0
- package/src/model/utils/autoparagraphing.js +32 -44
- package/src/model/utils/deletecontent.js +334 -418
- package/src/model/utils/findoptimalinsertionrange.js +25 -36
- package/src/model/utils/getselectedcontent.js +96 -118
- package/src/model/utils/insertcontent.js +757 -773
- package/src/model/utils/insertobject.js +96 -119
- package/src/model/utils/modifyselection.js +120 -158
- package/src/model/utils/selection-post-fixer.js +153 -201
- package/src/model/writer.js +1305 -1474
- package/src/view/attributeelement.js +189 -225
- package/src/view/containerelement.js +75 -85
- package/src/view/document.js +172 -215
- package/src/view/documentfragment.js +200 -249
- package/src/view/documentselection.js +338 -367
- package/src/view/domconverter.js +1370 -1617
- package/src/view/downcastwriter.js +1747 -2076
- package/src/view/editableelement.js +81 -97
- package/src/view/element.js +739 -890
- package/src/view/elementdefinition.js +5 -0
- package/src/view/emptyelement.js +82 -92
- package/src/view/filler.js +35 -50
- package/src/view/item.js +5 -0
- package/src/view/matcher.js +260 -559
- package/src/view/node.js +274 -360
- package/src/view/observer/arrowkeysobserver.js +19 -28
- package/src/view/observer/bubblingemittermixin.js +120 -263
- package/src/view/observer/bubblingeventinfo.js +47 -55
- package/src/view/observer/clickobserver.js +7 -13
- package/src/view/observer/compositionobserver.js +14 -24
- package/src/view/observer/domeventdata.js +57 -67
- package/src/view/observer/domeventobserver.js +40 -64
- package/src/view/observer/fakeselectionobserver.js +81 -96
- package/src/view/observer/focusobserver.js +45 -61
- package/src/view/observer/inputobserver.js +7 -13
- package/src/view/observer/keyobserver.js +17 -27
- package/src/view/observer/mouseobserver.js +7 -14
- package/src/view/observer/mutationobserver.js +220 -315
- package/src/view/observer/observer.js +81 -102
- package/src/view/observer/selectionobserver.js +199 -246
- package/src/view/observer/tabobserver.js +23 -36
- package/src/view/placeholder.js +128 -173
- package/src/view/position.js +350 -401
- package/src/view/range.js +453 -513
- package/src/view/rawelement.js +85 -112
- package/src/view/renderer.js +874 -1018
- package/src/view/rooteditableelement.js +80 -90
- package/src/view/selection.js +608 -689
- package/src/view/styles/background.js +43 -44
- package/src/view/styles/border.js +220 -276
- package/src/view/styles/margin.js +8 -17
- package/src/view/styles/padding.js +8 -16
- package/src/view/styles/utils.js +127 -160
- package/src/view/stylesmap.js +728 -905
- package/src/view/text.js +102 -126
- package/src/view/textproxy.js +144 -170
- package/src/view/treewalker.js +383 -479
- package/src/view/typecheckable.js +19 -0
- package/src/view/uielement.js +166 -187
- package/src/view/upcastwriter.js +395 -449
- package/src/view/view.js +569 -664
- package/src/dataprocessor/dataprocessor.jsdoc +0 -64
- package/src/model/item.jsdoc +0 -14
- package/src/view/elementdefinition.jsdoc +0 -59
- package/src/view/item.jsdoc +0 -14
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @module engine/dataprocessor/dataprocessor
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The data processor interface. It should be implemented by actual data processors.
|
|
12
|
-
*
|
|
13
|
-
* Each data processor implements a certain format of the data. For example, {@glink features/markdown Markdown data processor}
|
|
14
|
-
* will convert the data (a Markdown string) to a {@link module:engine/view/documentfragment~DocumentFragment document fragment} and back.
|
|
15
|
-
*
|
|
16
|
-
* **Note:** While the CKEditor 5 architecture supports changing the data format, in most scenarios we do recommend sticking to
|
|
17
|
-
* the default format which is HTML (supported by the {@link module:engine/dataprocessor/htmldataprocessor~HtmlDataProcessor}).
|
|
18
|
-
* HTML remains [the best standard for rich-text data](https://medium.com/content-uneditable/a-standard-for-rich-text-data-4b3a507af552).
|
|
19
|
-
*
|
|
20
|
-
* And please do remember – using Markdown [does not automatically make your
|
|
21
|
-
* application/website secure](https://github.com/ckeditor/ckeditor5-markdown-gfm/issues/16#issuecomment-375752994).
|
|
22
|
-
*
|
|
23
|
-
* @interface DataProcessor
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Converts a {@link module:engine/view/documentfragment~DocumentFragment document fragment} to data.
|
|
28
|
-
*
|
|
29
|
-
* @method #toData
|
|
30
|
-
* @param {module:engine/view/documentfragment~DocumentFragment} fragment The document fragment to be processed.
|
|
31
|
-
* @returns {*}
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Converts the data to a {@link module:engine/view/documentfragment~DocumentFragment document fragment}.
|
|
36
|
-
*
|
|
37
|
-
* @method #toView
|
|
38
|
-
* @param {*} data The data to be processed.
|
|
39
|
-
* @returns {module:engine/view/documentfragment~DocumentFragment}
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
|
|
44
|
-
* and its content should be converted to a
|
|
45
|
-
* {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `"$rawContent"` while
|
|
46
|
-
* converting {@link #toView to view}.
|
|
47
|
-
*
|
|
48
|
-
* @method #registerRawContentMatcher
|
|
49
|
-
* @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching all view elements whose content should
|
|
50
|
-
* be treated as plain text.
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* If the processor is set to use marked fillers, it will insert ` ` fillers wrapped in `<span>` elements
|
|
55
|
-
* (`<span data-cke-filler="true"> </span>`) instead of regular ` ` characters.
|
|
56
|
-
*
|
|
57
|
-
* This mode allows for more precise handling of block fillers (so they do not leak into the editor content) but bloats the
|
|
58
|
-
* editor data with additional markup.
|
|
59
|
-
*
|
|
60
|
-
* This mode may be required by some features and will be turned on by them automatically.
|
|
61
|
-
*
|
|
62
|
-
* @method #useFillerType
|
|
63
|
-
* @param {'default'|'marked'} type Whether to use the default or marked ` ` block fillers.
|
|
64
|
-
*/
|
package/src/model/item.jsdoc
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @module engine/model/item
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Item is a {@link module:engine/model/node~Node} or {@link module:engine/model/textproxy~TextProxy}.
|
|
12
|
-
*
|
|
13
|
-
* @typedef {module:engine/model/node~Node|module:engine/model/textproxy~TextProxy} module:engine/model/item~Item
|
|
14
|
-
*/
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @module engine/view/elementdefinition
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A plain object that describes a view element in a way that a concrete, exact view element could be created from that description.
|
|
12
|
-
*
|
|
13
|
-
* const viewDefinition = {
|
|
14
|
-
* name: 'h1',
|
|
15
|
-
* classes: [ 'foo', 'bar' ]
|
|
16
|
-
* };
|
|
17
|
-
*
|
|
18
|
-
* Above describes a view element:
|
|
19
|
-
*
|
|
20
|
-
* <h1 class="foo bar"></h1>
|
|
21
|
-
*
|
|
22
|
-
* An example with styles and attributes:
|
|
23
|
-
*
|
|
24
|
-
* const viewDefinition = {
|
|
25
|
-
* name: 'span',
|
|
26
|
-
* styles: {
|
|
27
|
-
* 'font-size': '12px',
|
|
28
|
-
* 'font-weight': 'bold'
|
|
29
|
-
* },
|
|
30
|
-
* attributes: {
|
|
31
|
-
* 'data-id': '123'
|
|
32
|
-
* }
|
|
33
|
-
* };
|
|
34
|
-
*
|
|
35
|
-
* Describes:
|
|
36
|
-
*
|
|
37
|
-
* <span style="font-size:12px;font-weight:bold" data-id="123"></span>
|
|
38
|
-
*
|
|
39
|
-
* Elements without attributes can be given simply as a string:
|
|
40
|
-
*
|
|
41
|
-
* const viewDefinition = 'p';
|
|
42
|
-
*
|
|
43
|
-
* Which will be treated as:
|
|
44
|
-
*
|
|
45
|
-
* const viewDefinition = {
|
|
46
|
-
* name: 'p'
|
|
47
|
-
* };
|
|
48
|
-
*
|
|
49
|
-
* @typedef {String|Object} module:engine/view/elementdefinition~ElementDefinition
|
|
50
|
-
*
|
|
51
|
-
* @property {String} name View element name.
|
|
52
|
-
* @property {String|Array.<String>} [classes] Class name or array of class names to match. Each name can be
|
|
53
|
-
* provided in a form of string.
|
|
54
|
-
* @property {Object} [styles] Object with key-value pairs representing styles. Each object key represents style name.
|
|
55
|
-
* Value under that key must be a string.
|
|
56
|
-
* @property {Object} [attributes] Object with key-value pairs representing attributes. Each object key represents
|
|
57
|
-
* attribute name. Value under that key must be a string.
|
|
58
|
-
* @property {Number} [priority] Element's {@link module:engine/view/attributeelement~AttributeElement#priority priority}.
|
|
59
|
-
*/
|
package/src/view/item.jsdoc
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @module engine/view/item
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Item is a {@link module:engine/view/node~Node Node} or {@link module:engine/view/textproxy~TextProxy TextProxy}.
|
|
12
|
-
*
|
|
13
|
-
* @typedef {module:engine/view/node~Node|module:engine/view/textproxy~TextProxy} module:engine/view/item~Item
|
|
14
|
-
*/
|