@ckeditor/ckeditor5-engine 38.2.0-alpha.1 → 39.0.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/README.md +0 -1
- package/package.json +3 -4
- package/src/controller/datacontroller.d.ts +15 -15
- package/src/controller/datacontroller.js +11 -11
- package/src/controller/editingcontroller.d.ts +7 -7
- package/src/controller/editingcontroller.js +8 -8
- package/src/conversion/conversion.d.ts +6 -6
- package/src/conversion/conversion.js +2 -2
- package/src/conversion/downcastdispatcher.d.ts +28 -13
- package/src/conversion/downcastdispatcher.js +30 -21
- package/src/conversion/downcasthelpers.d.ts +21 -21
- package/src/conversion/downcasthelpers.js +11 -11
- package/src/conversion/mapper.d.ts +9 -9
- package/src/conversion/mapper.js +5 -5
- package/src/conversion/modelconsumable.d.ts +5 -5
- package/src/conversion/modelconsumable.js +1 -1
- package/src/conversion/upcastdispatcher.d.ts +12 -12
- package/src/conversion/upcastdispatcher.js +5 -5
- package/src/conversion/upcasthelpers.d.ts +9 -9
- package/src/conversion/upcasthelpers.js +3 -3
- package/src/conversion/viewconsumable.d.ts +5 -5
- package/src/dataprocessor/basichtmlwriter.d.ts +1 -1
- package/src/dataprocessor/dataprocessor.d.ts +2 -2
- package/src/dataprocessor/htmldataprocessor.d.ts +6 -6
- package/src/dataprocessor/htmldataprocessor.js +2 -2
- package/src/dataprocessor/xmldataprocessor.d.ts +6 -6
- package/src/dataprocessor/xmldataprocessor.js +2 -2
- package/src/dev-utils/model.d.ts +10 -10
- package/src/dev-utils/model.js +16 -16
- package/src/dev-utils/operationreplayer.d.ts +2 -2
- package/src/dev-utils/operationreplayer.js +1 -1
- package/src/dev-utils/view.d.ts +8 -8
- package/src/dev-utils/view.js +15 -15
- package/src/index.d.ts +107 -106
- package/src/index.js +65 -64
- package/src/model/batch.d.ts +1 -1
- package/src/model/differ.d.ts +19 -5
- package/src/model/differ.js +72 -13
- package/src/model/document.d.ts +18 -12
- package/src/model/document.js +18 -13
- package/src/model/documentfragment.d.ts +4 -4
- package/src/model/documentfragment.js +5 -5
- package/src/model/documentselection.d.ts +8 -8
- package/src/model/documentselection.js +8 -5
- package/src/model/element.d.ts +2 -2
- package/src/model/element.js +4 -4
- package/src/model/history.d.ts +1 -1
- package/src/model/item.d.ts +2 -2
- package/src/model/liveposition.d.ts +4 -4
- package/src/model/liveposition.js +1 -1
- package/src/model/liverange.d.ts +5 -5
- package/src/model/liverange.js +1 -1
- package/src/model/markercollection.d.ts +4 -4
- package/src/model/markercollection.js +2 -2
- package/src/model/model.d.ts +14 -15
- package/src/model/model.js +18 -19
- package/src/model/node.d.ts +5 -5
- package/src/model/node.js +2 -2
- package/src/model/nodelist.d.ts +1 -1
- package/src/model/nodelist.js +1 -1
- package/src/model/operation/attributeoperation.d.ts +4 -4
- package/src/model/operation/attributeoperation.js +3 -3
- package/src/model/operation/detachoperation.d.ts +3 -3
- package/src/model/operation/detachoperation.js +3 -3
- package/src/model/operation/insertoperation.d.ts +6 -6
- package/src/model/operation/insertoperation.js +7 -7
- package/src/model/operation/markeroperation.d.ts +5 -5
- package/src/model/operation/markeroperation.js +2 -2
- package/src/model/operation/mergeoperation.d.ts +5 -5
- package/src/model/operation/mergeoperation.js +5 -5
- package/src/model/operation/moveoperation.d.ts +4 -4
- package/src/model/operation/moveoperation.js +4 -4
- package/src/model/operation/nooperation.d.ts +2 -2
- package/src/model/operation/nooperation.js +1 -1
- package/src/model/operation/operation.d.ts +3 -3
- package/src/model/operation/operationfactory.d.ts +2 -2
- package/src/model/operation/operationfactory.js +11 -11
- package/src/model/operation/renameoperation.d.ts +4 -4
- package/src/model/operation/renameoperation.js +3 -3
- package/src/model/operation/rootattributeoperation.d.ts +4 -4
- package/src/model/operation/rootattributeoperation.js +1 -1
- package/src/model/operation/rootoperation.d.ts +3 -7
- package/src/model/operation/rootoperation.js +1 -25
- package/src/model/operation/splitoperation.d.ts +5 -5
- package/src/model/operation/splitoperation.js +5 -5
- package/src/model/operation/transform.d.ts +2 -2
- package/src/model/operation/transform.js +14 -14
- package/src/model/operation/utils.d.ts +6 -6
- package/src/model/operation/utils.js +4 -4
- package/src/model/position.d.ts +14 -14
- package/src/model/position.js +3 -3
- package/src/model/range.d.ts +12 -12
- package/src/model/range.js +3 -3
- package/src/model/rootelement.d.ts +8 -2
- package/src/model/rootelement.js +7 -1
- package/src/model/schema.d.ts +9 -9
- package/src/model/schema.js +10 -5
- package/src/model/selection.d.ts +7 -7
- package/src/model/selection.js +4 -4
- package/src/model/text.d.ts +1 -1
- package/src/model/text.js +1 -1
- package/src/model/textproxy.d.ts +5 -5
- package/src/model/textproxy.js +1 -1
- package/src/model/treewalker.d.ts +3 -3
- package/src/model/treewalker.js +4 -4
- package/src/model/typecheckable.d.ts +13 -13
- package/src/model/utils/autoparagraphing.d.ts +4 -4
- package/src/model/utils/autoparagraphing.js +1 -2
- package/src/model/utils/deletecontent.d.ts +3 -3
- package/src/model/utils/deletecontent.js +3 -3
- package/src/model/utils/findoptimalinsertionrange.d.ts +4 -4
- package/src/model/utils/getselectedcontent.d.ts +4 -4
- package/src/model/utils/insertcontent.d.ts +6 -6
- package/src/model/utils/insertcontent.js +6 -6
- package/src/model/utils/insertobject.d.ts +5 -5
- package/src/model/utils/insertobject.js +1 -1
- package/src/model/utils/modifyselection.d.ts +3 -3
- package/src/model/utils/modifyselection.js +4 -4
- package/src/model/utils/selection-post-fixer.d.ts +3 -3
- package/src/model/utils/selection-post-fixer.js +2 -2
- package/src/model/writer.d.ts +12 -12
- package/src/model/writer.js +17 -17
- package/src/view/attributeelement.d.ts +3 -3
- package/src/view/attributeelement.js +1 -1
- package/src/view/containerelement.d.ts +3 -3
- package/src/view/containerelement.js +1 -1
- package/src/view/document.d.ts +4 -4
- package/src/view/document.js +2 -2
- package/src/view/documentfragment.d.ts +4 -4
- package/src/view/documentfragment.js +3 -3
- package/src/view/documentselection.d.ts +8 -8
- package/src/view/documentselection.js +2 -2
- package/src/view/domconverter.d.ts +19 -13
- package/src/view/domconverter.js +28 -10
- package/src/view/downcastwriter.d.ts +17 -17
- package/src/view/downcastwriter.js +11 -11
- package/src/view/editableelement.d.ts +14 -4
- package/src/view/editableelement.js +2 -1
- package/src/view/element.d.ts +5 -5
- package/src/view/element.js +5 -5
- package/src/view/emptyelement.d.ts +4 -4
- package/src/view/emptyelement.js +2 -2
- package/src/view/filler.d.ts +1 -1
- package/src/view/item.d.ts +2 -2
- package/src/view/matcher.d.ts +1 -1
- package/src/view/node.d.ts +5 -5
- package/src/view/node.js +2 -2
- package/src/view/observer/arrowkeysobserver.d.ts +4 -4
- package/src/view/observer/arrowkeysobserver.js +2 -2
- package/src/view/observer/bubblingemittermixin.d.ts +2 -2
- package/src/view/observer/bubblingemittermixin.js +1 -1
- package/src/view/observer/bubblingeventinfo.d.ts +3 -3
- package/src/view/observer/clickobserver.d.ts +3 -3
- package/src/view/observer/clickobserver.js +1 -1
- package/src/view/observer/compositionobserver.d.ts +3 -3
- package/src/view/observer/compositionobserver.js +1 -1
- package/src/view/observer/domeventdata.d.ts +3 -3
- package/src/view/observer/domeventobserver.d.ts +1 -1
- package/src/view/observer/domeventobserver.js +2 -2
- package/src/view/observer/fakeselectionobserver.d.ts +2 -2
- package/src/view/observer/fakeselectionobserver.js +2 -2
- package/src/view/observer/focusobserver.d.ts +3 -3
- package/src/view/observer/focusobserver.js +1 -1
- package/src/view/observer/inputobserver.d.ts +4 -4
- package/src/view/observer/inputobserver.js +2 -2
- package/src/view/observer/keyobserver.d.ts +2 -2
- package/src/view/observer/keyobserver.js +1 -1
- package/src/view/observer/mouseobserver.d.ts +2 -2
- package/src/view/observer/mouseobserver.js +1 -1
- package/src/view/observer/mutationobserver.d.ts +4 -4
- package/src/view/observer/mutationobserver.js +2 -2
- package/src/view/observer/observer.d.ts +2 -2
- package/src/view/observer/selectionobserver.d.ts +7 -7
- package/src/view/observer/selectionobserver.js +5 -5
- package/src/view/observer/tabobserver.d.ts +4 -4
- package/src/view/observer/tabobserver.js +2 -2
- package/src/view/placeholder.d.ts +16 -8
- package/src/view/placeholder.js +21 -12
- package/src/view/position.d.ts +7 -7
- package/src/view/position.js +4 -4
- package/src/view/range.d.ts +7 -7
- package/src/view/range.js +3 -3
- package/src/view/rawelement.d.ts +5 -5
- package/src/view/rawelement.js +2 -2
- package/src/view/renderer.d.ts +5 -5
- package/src/view/renderer.js +4 -5
- package/src/view/rooteditableelement.d.ts +2 -2
- package/src/view/rooteditableelement.js +1 -1
- package/src/view/selection.d.ts +8 -8
- package/src/view/selection.js +5 -5
- package/src/view/styles/background.d.ts +1 -1
- package/src/view/styles/background.js +1 -1
- package/src/view/styles/border.d.ts +1 -1
- package/src/view/styles/border.js +1 -1
- package/src/view/styles/margin.d.ts +1 -1
- package/src/view/styles/margin.js +1 -1
- package/src/view/styles/padding.d.ts +1 -1
- package/src/view/styles/padding.js +1 -1
- package/src/view/styles/utils.d.ts +1 -1
- package/src/view/text.d.ts +2 -2
- package/src/view/text.js +1 -1
- package/src/view/textproxy.d.ts +6 -6
- package/src/view/textproxy.js +1 -1
- package/src/view/treewalker.d.ts +3 -3
- package/src/view/treewalker.js +4 -4
- package/src/view/typecheckable.d.ts +16 -16
- package/src/view/uielement.d.ts +6 -6
- package/src/view/uielement.js +2 -2
- package/src/view/upcastwriter.d.ts +9 -9
- package/src/view/upcastwriter.js +6 -6
- package/src/view/view.d.ts +26 -19
- package/src/view/view.js +31 -19
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@ CKEditor 5 editing engine
|
|
|
4
4
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-engine)
|
|
5
5
|
[](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
|
6
6
|
[](https://app.travis-ci.com/github/ckeditor/ckeditor5)
|
|
7
|
-

|
|
8
7
|
|
|
9
8
|
The CKEditor 5 editing engine implements a flexible MVC-based architecture for creating rich text editing features.
|
|
10
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "39.0.0",
|
|
4
4
|
"description": "The editing engine of CKEditor 5 – the best browser-based rich text editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wysiwyg",
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
"ckeditor5-dll"
|
|
23
23
|
],
|
|
24
24
|
"main": "src/index.js",
|
|
25
|
-
"type": "module",
|
|
26
25
|
"dependencies": {
|
|
27
|
-
"@ckeditor/ckeditor5-utils": "
|
|
28
|
-
"lodash-es": "
|
|
26
|
+
"@ckeditor/ckeditor5-utils": "39.0.0",
|
|
27
|
+
"lodash-es": "4.17.21"
|
|
29
28
|
},
|
|
30
29
|
"engines": {
|
|
31
30
|
"node": ">=16.0.0",
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import Mapper from '../conversion/mapper
|
|
6
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher
|
|
7
|
-
import UpcastDispatcher from '../conversion/upcastdispatcher
|
|
8
|
-
import ViewDocumentFragment from '../view/documentfragment
|
|
9
|
-
import ViewDocument from '../view/document
|
|
10
|
-
import type ViewElement from '../view/element
|
|
11
|
-
import type { StylesProcessor } from '../view/stylesmap
|
|
12
|
-
import type { MatcherPattern } from '../view/matcher
|
|
13
|
-
import type Model from '../model/model
|
|
14
|
-
import type ModelElement from '../model/element
|
|
15
|
-
import type ModelDocumentFragment from '../model/documentfragment
|
|
16
|
-
import type { SchemaContextDefinition } from '../model/schema
|
|
17
|
-
import type { BatchType } from '../model/batch
|
|
18
|
-
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor
|
|
19
|
-
import type DataProcessor from '../dataprocessor/dataprocessor
|
|
5
|
+
import Mapper from '../conversion/mapper';
|
|
6
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
7
|
+
import UpcastDispatcher from '../conversion/upcastdispatcher';
|
|
8
|
+
import ViewDocumentFragment from '../view/documentfragment';
|
|
9
|
+
import ViewDocument from '../view/document';
|
|
10
|
+
import type ViewElement from '../view/element';
|
|
11
|
+
import type { StylesProcessor } from '../view/stylesmap';
|
|
12
|
+
import type { MatcherPattern } from '../view/matcher';
|
|
13
|
+
import type Model from '../model/model';
|
|
14
|
+
import type ModelElement from '../model/element';
|
|
15
|
+
import type ModelDocumentFragment from '../model/documentfragment';
|
|
16
|
+
import type { SchemaContextDefinition } from '../model/schema';
|
|
17
|
+
import type { BatchType } from '../model/batch';
|
|
18
|
+
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor';
|
|
19
|
+
import type DataProcessor from '../dataprocessor/dataprocessor';
|
|
20
20
|
declare const DataController_base: {
|
|
21
21
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
22
22
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
* @module engine/controller/datacontroller
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError, EmitterMixin, ObservableMixin, logWarning } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import Mapper from '../conversion/mapper
|
|
10
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher
|
|
11
|
-
import { insertAttributesAndChildren, insertText } from '../conversion/downcasthelpers
|
|
12
|
-
import UpcastDispatcher from '../conversion/upcastdispatcher
|
|
13
|
-
import { convertText, convertToModelFragment } from '../conversion/upcasthelpers
|
|
14
|
-
import ViewDocumentFragment from '../view/documentfragment
|
|
15
|
-
import ViewDocument from '../view/document
|
|
16
|
-
import ViewDowncastWriter from '../view/downcastwriter
|
|
17
|
-
import ModelRange from '../model/range
|
|
18
|
-
import { autoParagraphEmptyRoots } from '../model/utils/autoparagraphing
|
|
19
|
-
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor
|
|
9
|
+
import Mapper from '../conversion/mapper';
|
|
10
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
11
|
+
import { insertAttributesAndChildren, insertText } from '../conversion/downcasthelpers';
|
|
12
|
+
import UpcastDispatcher from '../conversion/upcastdispatcher';
|
|
13
|
+
import { convertText, convertToModelFragment } from '../conversion/upcasthelpers';
|
|
14
|
+
import ViewDocumentFragment from '../view/documentfragment';
|
|
15
|
+
import ViewDocument from '../view/document';
|
|
16
|
+
import ViewDowncastWriter from '../view/downcastwriter';
|
|
17
|
+
import ModelRange from '../model/range';
|
|
18
|
+
import { autoParagraphEmptyRoots } from '../model/utils/autoparagraphing';
|
|
19
|
+
import HtmlDataProcessor from '../dataprocessor/htmldataprocessor';
|
|
20
20
|
/**
|
|
21
21
|
* Controller for the data pipeline. The data pipeline controls how data is retrieved from the document
|
|
22
22
|
* and set inside it. Hence, the controller features two methods which allow to {@link ~DataController#get get}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import View from '../view/view
|
|
6
|
-
import Mapper from '../conversion/mapper
|
|
7
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher
|
|
8
|
-
import type { default as Model } from '../model/model
|
|
9
|
-
import type ModelItem from '../model/item
|
|
10
|
-
import type { Marker } from '../model/markercollection
|
|
11
|
-
import type { StylesProcessor } from '../view/stylesmap
|
|
5
|
+
import View from '../view/view';
|
|
6
|
+
import Mapper from '../conversion/mapper';
|
|
7
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
8
|
+
import type { default as Model } from '../model/model';
|
|
9
|
+
import type ModelItem from '../model/item';
|
|
10
|
+
import type { Marker } from '../model/markercollection';
|
|
11
|
+
import type { StylesProcessor } from '../view/stylesmap';
|
|
12
12
|
declare const EditingController_base: {
|
|
13
13
|
new (): import("@ckeditor/ckeditor5-utils").Observable;
|
|
14
14
|
prototype: import("@ckeditor/ckeditor5-utils").Observable;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* @module engine/controller/editingcontroller
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError, ObservableMixin, env } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import RootEditableElement from '../view/rooteditableelement
|
|
10
|
-
import View from '../view/view
|
|
11
|
-
import Mapper from '../conversion/mapper
|
|
12
|
-
import DowncastDispatcher from '../conversion/downcastdispatcher
|
|
13
|
-
import {
|
|
14
|
-
import { convertSelectionChange } from '../conversion/upcasthelpers
|
|
15
|
-
import { tryFixingRange } from '../model/utils/selection-post-fixer
|
|
9
|
+
import RootEditableElement from '../view/rooteditableelement';
|
|
10
|
+
import View from '../view/view';
|
|
11
|
+
import Mapper from '../conversion/mapper';
|
|
12
|
+
import DowncastDispatcher from '../conversion/downcastdispatcher';
|
|
13
|
+
import { cleanSelection, convertCollapsedSelection, convertRangeSelection, insertAttributesAndChildren, insertText, remove } from '../conversion/downcasthelpers';
|
|
14
|
+
import { convertSelectionChange } from '../conversion/upcasthelpers';
|
|
15
|
+
import { tryFixingRange } from '../model/utils/selection-post-fixer';
|
|
16
16
|
// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );
|
|
17
17
|
/**
|
|
18
18
|
* A controller for the editing pipeline. The editing pipeline controls the {@link ~EditingController#model model} rendering,
|
|
@@ -67,7 +67,7 @@ export default class EditingController extends ObservableMixin() {
|
|
|
67
67
|
this.downcastDispatcher.on('insert', insertAttributesAndChildren(), { priority: 'lowest' });
|
|
68
68
|
this.downcastDispatcher.on('remove', remove(), { priority: 'low' });
|
|
69
69
|
// Attach default model selection converters.
|
|
70
|
-
this.downcastDispatcher.on('
|
|
70
|
+
this.downcastDispatcher.on('cleanSelection', cleanSelection());
|
|
71
71
|
this.downcastDispatcher.on('selection', convertRangeSelection(), { priority: 'low' });
|
|
72
72
|
this.downcastDispatcher.on('selection', convertCollapsedSelection(), { priority: 'low' });
|
|
73
73
|
// Binds {@link module:engine/view/document~Document#roots view roots collection} to
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @module engine/conversion/conversion
|
|
7
7
|
*/
|
|
8
8
|
import { type ArrayOrItem, type PriorityString } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import UpcastHelpers from './upcasthelpers
|
|
10
|
-
import DowncastHelpers, { type AttributeCreatorFunction, type AttributeDescriptor } from './downcasthelpers
|
|
11
|
-
import type DowncastDispatcher from './downcastdispatcher
|
|
12
|
-
import type UpcastDispatcher from './upcastdispatcher
|
|
13
|
-
import type ElementDefinition from '../view/elementdefinition
|
|
14
|
-
import type { MatcherPattern } from '../view/matcher
|
|
9
|
+
import UpcastHelpers from './upcasthelpers';
|
|
10
|
+
import DowncastHelpers, { type AttributeCreatorFunction, type AttributeDescriptor } from './downcasthelpers';
|
|
11
|
+
import type DowncastDispatcher from './downcastdispatcher';
|
|
12
|
+
import type UpcastDispatcher from './upcastdispatcher';
|
|
13
|
+
import type ElementDefinition from '../view/elementdefinition';
|
|
14
|
+
import type { MatcherPattern } from '../view/matcher';
|
|
15
15
|
/**
|
|
16
16
|
* A utility class that helps add converters to upcast and downcast dispatchers.
|
|
17
17
|
*
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module engine/conversion/conversion
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError, toArray } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
import UpcastHelpers from './upcasthelpers
|
|
10
|
-
import DowncastHelpers from './downcasthelpers
|
|
9
|
+
import UpcastHelpers from './upcasthelpers';
|
|
10
|
+
import DowncastHelpers from './downcasthelpers';
|
|
11
11
|
/**
|
|
12
12
|
* A utility class that helps add converters to upcast and downcast dispatchers.
|
|
13
13
|
*
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/downcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import Consumable from './modelconsumable
|
|
9
|
-
import Range from '../model/range
|
|
10
|
-
import type { default as Differ, DiffItem } from '../model/differ
|
|
11
|
-
import type { default as MarkerCollection } from '../model/markercollection
|
|
12
|
-
import type DocumentSelection from '../model/documentselection
|
|
13
|
-
import type DowncastWriter from '../view/downcastwriter
|
|
14
|
-
import type Element from '../model/element
|
|
15
|
-
import type Item from '../model/item
|
|
16
|
-
import type Mapper from './mapper
|
|
17
|
-
import type Position from '../model/position
|
|
18
|
-
import type Schema from '../model/schema
|
|
19
|
-
import type Selection from '../model/selection
|
|
20
|
-
import type ViewElement from '../view/element
|
|
8
|
+
import Consumable from './modelconsumable';
|
|
9
|
+
import Range from '../model/range';
|
|
10
|
+
import type { default as Differ, DiffItem } from '../model/differ';
|
|
11
|
+
import type { default as MarkerCollection } from '../model/markercollection';
|
|
12
|
+
import type DocumentSelection from '../model/documentselection';
|
|
13
|
+
import type DowncastWriter from '../view/downcastwriter';
|
|
14
|
+
import type Element from '../model/element';
|
|
15
|
+
import type Item from '../model/item';
|
|
16
|
+
import type Mapper from './mapper';
|
|
17
|
+
import type Position from '../model/position';
|
|
18
|
+
import type Schema from '../model/schema';
|
|
19
|
+
import type Selection from '../model/selection';
|
|
20
|
+
import type ViewElement from '../view/element';
|
|
21
21
|
declare const DowncastDispatcher_base: {
|
|
22
22
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
23
23
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
@@ -346,6 +346,9 @@ type EventMap<TItem = Item> = {
|
|
|
346
346
|
attributeOldValue: unknown;
|
|
347
347
|
attributeNewValue: unknown;
|
|
348
348
|
};
|
|
349
|
+
cleanSelection: {
|
|
350
|
+
selection: Selection | DocumentSelection;
|
|
351
|
+
};
|
|
349
352
|
selection: {
|
|
350
353
|
selection: Selection | DocumentSelection;
|
|
351
354
|
};
|
|
@@ -433,6 +436,18 @@ export type DowncastAttributeEvent<TItem = Item | Selection | DocumentSelection>
|
|
|
433
436
|
* to be used by callback, passed in `DowncastDispatcher` constructor.
|
|
434
437
|
*/
|
|
435
438
|
export type DowncastSelectionEvent = DowncastEvent<'selection'>;
|
|
439
|
+
/**
|
|
440
|
+
* Fired at the beginning of selection conversion, before
|
|
441
|
+
* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:selection selection} events.
|
|
442
|
+
*
|
|
443
|
+
* Should be used to clean up the view state at the current selection position, before the selection is moved to another place.
|
|
444
|
+
*
|
|
445
|
+
* @eventName ~DowncastDispatcher#cleanSelection
|
|
446
|
+
* @param {module:engine/model/selection~Selection} selection Selection that is converted.
|
|
447
|
+
* @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface
|
|
448
|
+
* to be used by callback, passed in `DowncastDispatcher` constructor.
|
|
449
|
+
*/
|
|
450
|
+
export type DowncastCleanSelectionEvent = DowncastEvent<'cleanSelection'>;
|
|
436
451
|
/**
|
|
437
452
|
* Fired when a new marker is added to the model. Also fired when a collapsed model selection that is inside a marker is converted.
|
|
438
453
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/downcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import Consumable from './modelconsumable
|
|
9
|
-
import Range from '../model/range
|
|
8
|
+
import Consumable from './modelconsumable';
|
|
9
|
+
import Range from '../model/range';
|
|
10
10
|
import { EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
11
11
|
/**
|
|
12
12
|
* The downcast dispatcher is a central point of downcasting (conversion from the model to the view), which is a process of reacting
|
|
@@ -198,38 +198,47 @@ export default class DowncastDispatcher extends EmitterMixin() {
|
|
|
198
198
|
* @param writer View writer that should be used to modify the view document.
|
|
199
199
|
*/
|
|
200
200
|
convertSelection(selection, markers, writer) {
|
|
201
|
-
const markersAtSelection = Array.from(markers.getMarkersAtPosition(selection.getFirstPosition()));
|
|
202
201
|
const conversionApi = this._createConversionApi(writer);
|
|
202
|
+
// First perform a clean-up at the current position of the selection.
|
|
203
|
+
this.fire('cleanSelection', { selection }, conversionApi);
|
|
204
|
+
// Don't convert selection if it is in a model root that does not have a view root (for now this is only the graveyard root).
|
|
205
|
+
const modelRoot = selection.getFirstPosition().root;
|
|
206
|
+
if (!conversionApi.mapper.toViewElement(modelRoot)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
// Now, perform actual selection conversion.
|
|
210
|
+
const markersAtSelection = Array.from(markers.getMarkersAtPosition(selection.getFirstPosition()));
|
|
203
211
|
this._addConsumablesForSelection(conversionApi.consumable, selection, markersAtSelection);
|
|
204
212
|
this.fire('selection', { selection }, conversionApi);
|
|
205
213
|
if (!selection.isCollapsed) {
|
|
206
214
|
return;
|
|
207
215
|
}
|
|
208
216
|
for (const marker of markersAtSelection) {
|
|
209
|
-
|
|
210
|
-
if (!shouldMarkerChangeBeConverted(selection.getFirstPosition(), marker, conversionApi.mapper)) {
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
const data = {
|
|
214
|
-
item: selection,
|
|
215
|
-
markerName: marker.name,
|
|
216
|
-
markerRange
|
|
217
|
-
};
|
|
217
|
+
// Do not fire event if the marker has been consumed.
|
|
218
218
|
if (conversionApi.consumable.test(selection, 'addMarker:' + marker.name)) {
|
|
219
|
+
const markerRange = marker.getRange();
|
|
220
|
+
if (!shouldMarkerChangeBeConverted(selection.getFirstPosition(), marker, conversionApi.mapper)) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const data = {
|
|
224
|
+
item: selection,
|
|
225
|
+
markerName: marker.name,
|
|
226
|
+
markerRange
|
|
227
|
+
};
|
|
219
228
|
this.fire(`addMarker:${marker.name}`, data, conversionApi);
|
|
220
229
|
}
|
|
221
230
|
}
|
|
222
231
|
for (const key of selection.getAttributeKeys()) {
|
|
223
|
-
const data = {
|
|
224
|
-
item: selection,
|
|
225
|
-
range: selection.getFirstRange(),
|
|
226
|
-
attributeKey: key,
|
|
227
|
-
attributeOldValue: null,
|
|
228
|
-
attributeNewValue: selection.getAttribute(key)
|
|
229
|
-
};
|
|
230
232
|
// Do not fire event if the attribute has been consumed.
|
|
231
|
-
if (conversionApi.consumable.test(selection, 'attribute:' +
|
|
232
|
-
|
|
233
|
+
if (conversionApi.consumable.test(selection, 'attribute:' + key)) {
|
|
234
|
+
const data = {
|
|
235
|
+
item: selection,
|
|
236
|
+
range: selection.getFirstRange(),
|
|
237
|
+
attributeKey: key,
|
|
238
|
+
attributeOldValue: null,
|
|
239
|
+
attributeNewValue: selection.getAttribute(key)
|
|
240
|
+
};
|
|
241
|
+
this.fire(`attribute:${key}:$text`, data, conversionApi);
|
|
233
242
|
}
|
|
234
243
|
}
|
|
235
244
|
}
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module engine/conversion/downcasthelpers
|
|
9
9
|
*/
|
|
10
|
-
import ModelRange from '../model/range
|
|
11
|
-
import ModelSelection from '../model/selection
|
|
12
|
-
import ModelDocumentSelection from '../model/documentselection
|
|
13
|
-
import ModelElement from '../model/element
|
|
14
|
-
import ModelPosition from '../model/position
|
|
15
|
-
import ViewAttributeElement from '../view/attributeelement
|
|
16
|
-
import ConversionHelpers from './conversionhelpers
|
|
17
|
-
import type { default as DowncastDispatcher, DowncastConversionApi } from './downcastdispatcher
|
|
18
|
-
import type ModelConsumable from './modelconsumable
|
|
19
|
-
import type ModelNode from '../model/node
|
|
20
|
-
import type ModelItem from '../model/item
|
|
21
|
-
import type ModelTextProxy from '../model/textproxy
|
|
22
|
-
import type ModelText from '../model/text
|
|
23
|
-
import type DowncastWriter from '../view/downcastwriter
|
|
24
|
-
import type ElementDefinition from '../view/elementdefinition
|
|
25
|
-
import type UIElement from '../view/uielement
|
|
26
|
-
import type ViewElement from '../view/element
|
|
10
|
+
import ModelRange from '../model/range';
|
|
11
|
+
import ModelSelection from '../model/selection';
|
|
12
|
+
import ModelDocumentSelection from '../model/documentselection';
|
|
13
|
+
import ModelElement from '../model/element';
|
|
14
|
+
import ModelPosition from '../model/position';
|
|
15
|
+
import ViewAttributeElement from '../view/attributeelement';
|
|
16
|
+
import ConversionHelpers from './conversionhelpers';
|
|
17
|
+
import type { default as DowncastDispatcher, DowncastConversionApi } from './downcastdispatcher';
|
|
18
|
+
import type ModelConsumable from './modelconsumable';
|
|
19
|
+
import type ModelNode from '../model/node';
|
|
20
|
+
import type ModelItem from '../model/item';
|
|
21
|
+
import type ModelTextProxy from '../model/textproxy';
|
|
22
|
+
import type ModelText from '../model/text';
|
|
23
|
+
import type DowncastWriter from '../view/downcastwriter';
|
|
24
|
+
import type ElementDefinition from '../view/elementdefinition';
|
|
25
|
+
import type UIElement from '../view/uielement';
|
|
26
|
+
import type ViewElement from '../view/element';
|
|
27
27
|
import { type EventInfo, type PriorityString } from '@ckeditor/ckeditor5-utils';
|
|
28
28
|
/**
|
|
29
29
|
* Downcast conversion helper functions.
|
|
@@ -880,7 +880,7 @@ export declare function convertRangeSelection(): (evt: EventInfo, data: {
|
|
|
880
880
|
* converted, broken attributes might be merged again, or the position where the selection is may be wrapped
|
|
881
881
|
* with different, appropriate attribute elements.
|
|
882
882
|
*
|
|
883
|
-
* See also {@link module:engine/conversion/downcasthelpers~
|
|
883
|
+
* See also {@link module:engine/conversion/downcasthelpers~cleanSelection} which does a clean-up
|
|
884
884
|
* by merging attributes.
|
|
885
885
|
*
|
|
886
886
|
* @returns Selection converter.
|
|
@@ -889,7 +889,7 @@ export declare function convertCollapsedSelection(): (evt: EventInfo, data: {
|
|
|
889
889
|
selection: ModelSelection | ModelDocumentSelection;
|
|
890
890
|
}, conversionApi: DowncastConversionApi) => void;
|
|
891
891
|
/**
|
|
892
|
-
* Function factory that creates a converter which
|
|
892
|
+
* Function factory that creates a converter which cleans artifacts after the previous
|
|
893
893
|
* {@link module:engine/model/selection~Selection model selection} conversion. It removes all empty
|
|
894
894
|
* {@link module:engine/view/attributeelement~AttributeElement view attribute elements} and merges sibling attributes at all start and end
|
|
895
895
|
* positions of all ranges.
|
|
@@ -908,7 +908,7 @@ export declare function convertCollapsedSelection(): (evt: EventInfo, data: {
|
|
|
908
908
|
* This listener should be assigned before any converter for the new selection:
|
|
909
909
|
*
|
|
910
910
|
* ```ts
|
|
911
|
-
* modelDispatcher.on( '
|
|
911
|
+
* modelDispatcher.on( 'cleanSelection', cleanSelection() );
|
|
912
912
|
* ```
|
|
913
913
|
*
|
|
914
914
|
* See {@link module:engine/conversion/downcasthelpers~convertCollapsedSelection}
|
|
@@ -916,7 +916,7 @@ export declare function convertCollapsedSelection(): (evt: EventInfo, data: {
|
|
|
916
916
|
*
|
|
917
917
|
* @returns Selection converter.
|
|
918
918
|
*/
|
|
919
|
-
export declare function
|
|
919
|
+
export declare function cleanSelection(): (evt: EventInfo, data: unknown, conversionApi: DowncastConversionApi) => void;
|
|
920
920
|
/**
|
|
921
921
|
* Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.
|
|
922
922
|
* It can also be used to convert selection attributes. In that case, an empty attribute element will be created and the
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module engine/conversion/downcasthelpers
|
|
9
9
|
*/
|
|
10
|
-
import ModelRange from '../model/range
|
|
11
|
-
import ModelSelection from '../model/selection
|
|
12
|
-
import ModelDocumentSelection from '../model/documentselection
|
|
13
|
-
import ModelElement from '../model/element
|
|
14
|
-
import ModelPosition from '../model/position
|
|
15
|
-
import ViewAttributeElement from '../view/attributeelement
|
|
16
|
-
import ConversionHelpers from './conversionhelpers
|
|
10
|
+
import ModelRange from '../model/range';
|
|
11
|
+
import ModelSelection from '../model/selection';
|
|
12
|
+
import ModelDocumentSelection from '../model/documentselection';
|
|
13
|
+
import ModelElement from '../model/element';
|
|
14
|
+
import ModelPosition from '../model/position';
|
|
15
|
+
import ViewAttributeElement from '../view/attributeelement';
|
|
16
|
+
import ConversionHelpers from './conversionhelpers';
|
|
17
17
|
import { CKEditorError, toArray } from '@ckeditor/ckeditor5-utils';
|
|
18
18
|
import { cloneDeep } from 'lodash-es';
|
|
19
19
|
/**
|
|
@@ -876,7 +876,7 @@ export function convertRangeSelection() {
|
|
|
876
876
|
* converted, broken attributes might be merged again, or the position where the selection is may be wrapped
|
|
877
877
|
* with different, appropriate attribute elements.
|
|
878
878
|
*
|
|
879
|
-
* See also {@link module:engine/conversion/downcasthelpers~
|
|
879
|
+
* See also {@link module:engine/conversion/downcasthelpers~cleanSelection} which does a clean-up
|
|
880
880
|
* by merging attributes.
|
|
881
881
|
*
|
|
882
882
|
* @returns Selection converter.
|
|
@@ -898,7 +898,7 @@ export function convertCollapsedSelection() {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
/**
|
|
901
|
-
* Function factory that creates a converter which
|
|
901
|
+
* Function factory that creates a converter which cleans artifacts after the previous
|
|
902
902
|
* {@link module:engine/model/selection~Selection model selection} conversion. It removes all empty
|
|
903
903
|
* {@link module:engine/view/attributeelement~AttributeElement view attribute elements} and merges sibling attributes at all start and end
|
|
904
904
|
* positions of all ranges.
|
|
@@ -917,7 +917,7 @@ export function convertCollapsedSelection() {
|
|
|
917
917
|
* This listener should be assigned before any converter for the new selection:
|
|
918
918
|
*
|
|
919
919
|
* ```ts
|
|
920
|
-
* modelDispatcher.on( '
|
|
920
|
+
* modelDispatcher.on( 'cleanSelection', cleanSelection() );
|
|
921
921
|
* ```
|
|
922
922
|
*
|
|
923
923
|
* See {@link module:engine/conversion/downcasthelpers~convertCollapsedSelection}
|
|
@@ -925,7 +925,7 @@ export function convertCollapsedSelection() {
|
|
|
925
925
|
*
|
|
926
926
|
* @returns Selection converter.
|
|
927
927
|
*/
|
|
928
|
-
export function
|
|
928
|
+
export function cleanSelection() {
|
|
929
929
|
return (evt, data, conversionApi) => {
|
|
930
930
|
const viewWriter = conversionApi.writer;
|
|
931
931
|
const viewSelection = viewWriter.document.selection;
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/mapper
|
|
7
7
|
*/
|
|
8
|
-
import ModelPosition from '../model/position
|
|
9
|
-
import ModelRange from '../model/range
|
|
10
|
-
import ViewPosition from '../view/position
|
|
11
|
-
import ViewRange from '../view/range
|
|
12
|
-
import type ViewDocumentFragment from '../view/documentfragment
|
|
13
|
-
import type ViewElement from '../view/element
|
|
14
|
-
import type ModelElement from '../model/element
|
|
15
|
-
import type ModelDocumentFragment from '../model/documentfragment
|
|
16
|
-
import type ViewNode from '../view/node
|
|
8
|
+
import ModelPosition from '../model/position';
|
|
9
|
+
import ModelRange from '../model/range';
|
|
10
|
+
import ViewPosition from '../view/position';
|
|
11
|
+
import ViewRange from '../view/range';
|
|
12
|
+
import type ViewDocumentFragment from '../view/documentfragment';
|
|
13
|
+
import type ViewElement from '../view/element';
|
|
14
|
+
import type ModelElement from '../model/element';
|
|
15
|
+
import type ModelDocumentFragment from '../model/documentfragment';
|
|
16
|
+
import type ViewNode from '../view/node';
|
|
17
17
|
declare const Mapper_base: {
|
|
18
18
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
19
19
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
package/src/conversion/mapper.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/mapper
|
|
7
7
|
*/
|
|
8
|
-
import ModelPosition from '../model/position
|
|
9
|
-
import ModelRange from '../model/range
|
|
10
|
-
import ViewPosition from '../view/position
|
|
11
|
-
import ViewRange from '../view/range
|
|
12
|
-
import ViewText from '../view/text
|
|
8
|
+
import ModelPosition from '../model/position';
|
|
9
|
+
import ModelRange from '../model/range';
|
|
10
|
+
import ViewPosition from '../view/position';
|
|
11
|
+
import ViewRange from '../view/range';
|
|
12
|
+
import ViewText from '../view/text';
|
|
13
13
|
import { CKEditorError, EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
14
14
|
/**
|
|
15
15
|
* Maps elements, positions and markers between the {@link module:engine/view/document~Document view} and
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/modelconsumable
|
|
7
7
|
*/
|
|
8
|
-
import TextProxy from '../model/textproxy
|
|
9
|
-
import type Item from '../model/item
|
|
10
|
-
import type Selection from '../model/selection
|
|
11
|
-
import type DocumentSelection from '../model/documentselection
|
|
12
|
-
import type Range from '../model/range
|
|
8
|
+
import TextProxy from '../model/textproxy';
|
|
9
|
+
import type Item from '../model/item';
|
|
10
|
+
import type Selection from '../model/selection';
|
|
11
|
+
import type DocumentSelection from '../model/documentselection';
|
|
12
|
+
import type Range from '../model/range';
|
|
13
13
|
/**
|
|
14
14
|
* Manages a list of consumable values for the {@link module:engine/model/item~Item model items}.
|
|
15
15
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/modelconsumable
|
|
7
7
|
*/
|
|
8
|
-
import TextProxy from '../model/textproxy
|
|
8
|
+
import TextProxy from '../model/textproxy';
|
|
9
9
|
import { CKEditorError } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
/**
|
|
11
11
|
* Manages a list of consumable values for the {@link module:engine/model/item~Item model items}.
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/upcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import ViewConsumable from './viewconsumable
|
|
9
|
-
import ModelRange from '../model/range
|
|
10
|
-
import ModelPosition from '../model/position
|
|
11
|
-
import type ModelElement from '../model/element
|
|
12
|
-
import type ModelNode from '../model/node
|
|
13
|
-
import type ViewElement from '../view/element
|
|
14
|
-
import type ViewText from '../view/text
|
|
15
|
-
import type ViewDocumentFragment from '../view/documentfragment
|
|
16
|
-
import type ModelDocumentFragment from '../model/documentfragment
|
|
17
|
-
import type { default as Schema, SchemaContextDefinition } from '../model/schema
|
|
18
|
-
import type ModelWriter from '../model/writer
|
|
19
|
-
import type ViewItem from '../view/item
|
|
8
|
+
import ViewConsumable from './viewconsumable';
|
|
9
|
+
import ModelRange from '../model/range';
|
|
10
|
+
import ModelPosition from '../model/position';
|
|
11
|
+
import type ModelElement from '../model/element';
|
|
12
|
+
import type ModelNode from '../model/node';
|
|
13
|
+
import type ViewElement from '../view/element';
|
|
14
|
+
import type ViewText from '../view/text';
|
|
15
|
+
import type ViewDocumentFragment from '../view/documentfragment';
|
|
16
|
+
import type ModelDocumentFragment from '../model/documentfragment';
|
|
17
|
+
import type { default as Schema, SchemaContextDefinition } from '../model/schema';
|
|
18
|
+
import type ModelWriter from '../model/writer';
|
|
19
|
+
import type ViewItem from '../view/item';
|
|
20
20
|
declare const UpcastDispatcher_base: {
|
|
21
21
|
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
22
22
|
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/conversion/upcastdispatcher
|
|
7
7
|
*/
|
|
8
|
-
import ViewConsumable from './viewconsumable
|
|
9
|
-
import ModelRange from '../model/range
|
|
10
|
-
import ModelPosition from '../model/position
|
|
11
|
-
import { SchemaContext } from '../model/schema
|
|
12
|
-
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing
|
|
8
|
+
import ViewConsumable from './viewconsumable';
|
|
9
|
+
import ModelRange from '../model/range';
|
|
10
|
+
import ModelPosition from '../model/position';
|
|
11
|
+
import { SchemaContext } from '../model/schema'; // eslint-disable-line no-duplicate-imports
|
|
12
|
+
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing';
|
|
13
13
|
import { CKEditorError, EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
14
14
|
/**
|
|
15
15
|
* Upcast dispatcher is a central point of the view-to-model conversion, which is a process of
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { type ClassPatterns, type MatcherPattern, type PropertyPatterns } from '../view/matcher
|
|
6
|
-
import ConversionHelpers from './conversionhelpers
|
|
7
|
-
import type { default as UpcastDispatcher, UpcastConversionApi, UpcastConversionData } from './upcastdispatcher
|
|
8
|
-
import type ModelElement from '../model/element
|
|
9
|
-
import type { ViewDocumentFragment, ViewElement, ViewText } from '../index
|
|
10
|
-
import type Mapper from './mapper
|
|
11
|
-
import type Model from '../model/model
|
|
12
|
-
import type ViewSelection from '../view/selection
|
|
13
|
-
import type ViewDocumentSelection from '../view/documentselection
|
|
5
|
+
import { type ClassPatterns, type MatcherPattern, type PropertyPatterns } from '../view/matcher';
|
|
6
|
+
import ConversionHelpers from './conversionhelpers';
|
|
7
|
+
import type { default as UpcastDispatcher, UpcastConversionApi, UpcastConversionData } from './upcastdispatcher';
|
|
8
|
+
import type ModelElement from '../model/element';
|
|
9
|
+
import type { ViewDocumentFragment, ViewElement, ViewText } from '../index';
|
|
10
|
+
import type Mapper from './mapper';
|
|
11
|
+
import type Model from '../model/model';
|
|
12
|
+
import type ViewSelection from '../view/selection';
|
|
13
|
+
import type ViewDocumentSelection from '../view/documentselection';
|
|
14
14
|
import { type EventInfo, type PriorityString } from '@ckeditor/ckeditor5-utils';
|
|
15
15
|
/**
|
|
16
16
|
* Contains the {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import Matcher from '../view/matcher
|
|
6
|
-
import ConversionHelpers from './conversionhelpers
|
|
7
|
-
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing
|
|
5
|
+
import Matcher from '../view/matcher';
|
|
6
|
+
import ConversionHelpers from './conversionhelpers';
|
|
7
|
+
import { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing';
|
|
8
8
|
import { priorities } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import { cloneDeep } from 'lodash-es';
|
|
10
10
|
/**
|