@ckeditor/ckeditor5-engine 35.3.2 → 36.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/LICENSE.md +1 -1
- package/package.json +22 -22
- package/src/controller/datacontroller.js +10 -8
- package/src/controller/editingcontroller.js +3 -4
- package/src/conversion/conversion.js +2 -3
- package/src/conversion/conversionhelpers.js +1 -1
- package/src/conversion/downcastdispatcher.js +3 -3
- package/src/conversion/downcasthelpers.js +2 -3
- package/src/conversion/mapper.js +3 -4
- package/src/conversion/modelconsumable.js +2 -2
- package/src/conversion/upcastdispatcher.js +3 -4
- package/src/conversion/upcasthelpers.js +10 -3
- package/src/conversion/viewconsumable.js +2 -2
- package/src/dataprocessor/basichtmlwriter.js +1 -1
- package/src/dataprocessor/dataprocessor.js +1 -1
- package/src/dataprocessor/htmldataprocessor.js +3 -3
- package/src/dataprocessor/htmlwriter.js +1 -1
- package/src/dataprocessor/xmldataprocessor.js +6 -2
- package/src/dev-utils/model.js +3 -3
- package/src/dev-utils/operationreplayer.js +1 -1
- package/src/dev-utils/utils.js +1 -1
- package/src/dev-utils/view.js +1 -1
- package/src/index.js +13 -3
- package/src/model/batch.js +10 -47
- package/src/model/differ.js +81 -174
- package/src/model/document.js +38 -97
- package/src/model/documentfragment.js +44 -97
- package/src/model/documentselection.js +152 -251
- package/src/model/element.js +48 -101
- package/src/model/history.js +15 -46
- package/src/model/item.js +1 -1
- package/src/model/liveposition.js +11 -39
- package/src/model/liverange.js +14 -38
- package/src/model/markercollection.js +42 -115
- package/src/model/model.js +214 -292
- package/src/model/node.js +36 -128
- package/src/model/nodelist.js +12 -41
- package/src/model/operation/attributeoperation.js +14 -45
- package/src/model/operation/detachoperation.js +4 -17
- package/src/model/operation/insertoperation.js +7 -35
- package/src/model/operation/markeroperation.js +9 -48
- package/src/model/operation/mergeoperation.js +9 -42
- package/src/model/operation/moveoperation.js +15 -39
- package/src/model/operation/nooperation.js +1 -7
- package/src/model/operation/operation.js +5 -63
- package/src/model/operation/operationfactory.js +3 -6
- package/src/model/operation/renameoperation.js +9 -29
- package/src/model/operation/rootattributeoperation.js +19 -48
- package/src/model/operation/splitoperation.js +10 -48
- package/src/model/operation/transform.js +110 -151
- package/src/model/operation/utils.js +37 -52
- package/src/model/position.js +118 -230
- package/src/model/range.js +146 -202
- package/src/model/rootelement.js +8 -47
- package/src/model/schema.js +245 -282
- package/src/model/selection.js +135 -196
- package/src/model/text.js +10 -37
- package/src/model/textproxy.js +16 -70
- package/src/model/treewalker.js +11 -102
- package/src/model/typecheckable.js +1 -1
- package/src/model/utils/autoparagraphing.js +11 -12
- package/src/model/utils/deletecontent.js +93 -62
- package/src/model/utils/findoptimalinsertionrange.js +25 -25
- package/src/model/utils/getselectedcontent.js +3 -6
- package/src/model/utils/insertcontent.js +37 -130
- package/src/model/utils/insertobject.js +40 -40
- package/src/model/utils/modifyselection.js +24 -34
- package/src/model/utils/selection-post-fixer.js +53 -59
- package/src/model/writer.js +209 -316
- package/src/view/attributeelement.js +2 -2
- package/src/view/containerelement.js +1 -1
- package/src/view/datatransfer.js +1 -1
- package/src/view/document.js +3 -5
- package/src/view/documentfragment.js +50 -4
- package/src/view/documentselection.js +2 -3
- package/src/view/domconverter.js +4 -8
- package/src/view/downcastwriter.js +2 -3
- package/src/view/editableelement.js +2 -3
- package/src/view/element.js +6 -8
- package/src/view/elementdefinition.js +1 -1
- package/src/view/emptyelement.js +2 -2
- package/src/view/filler.js +2 -3
- package/src/view/item.js +1 -1
- package/src/view/matcher.js +2 -2
- package/src/view/node.js +2 -5
- package/src/view/observer/arrowkeysobserver.js +1 -1
- package/src/view/observer/bubblingemittermixin.js +3 -6
- package/src/view/observer/bubblingeventinfo.js +2 -2
- package/src/view/observer/clickobserver.js +1 -1
- package/src/view/observer/compositionobserver.js +1 -1
- package/src/view/observer/domeventdata.js +1 -1
- package/src/view/observer/domeventobserver.js +1 -1
- package/src/view/observer/fakeselectionobserver.js +2 -2
- package/src/view/observer/focusobserver.js +25 -3
- package/src/view/observer/inputobserver.js +2 -2
- package/src/view/observer/keyobserver.js +2 -2
- package/src/view/observer/mouseobserver.js +1 -1
- package/src/view/observer/mutationobserver.js +1 -1
- package/src/view/observer/observer.js +3 -3
- package/src/view/observer/selectionobserver.js +21 -3
- package/src/view/observer/tabobserver.js +2 -2
- package/src/view/placeholder.js +1 -1
- package/src/view/position.js +2 -3
- package/src/view/range.js +1 -1
- package/src/view/rawelement.js +2 -2
- package/src/view/renderer.js +3 -12
- package/src/view/rooteditableelement.js +1 -1
- package/src/view/selection.js +2 -6
- package/src/view/styles/background.js +1 -1
- package/src/view/styles/border.js +1 -1
- package/src/view/styles/margin.js +1 -1
- package/src/view/styles/padding.js +1 -1
- package/src/view/styles/utils.js +1 -1
- package/src/view/stylesmap.js +1 -1
- package/src/view/text.js +1 -1
- package/src/view/textproxy.js +2 -2
- package/src/view/treewalker.js +2 -2
- package/src/view/typecheckable.js +1 -1
- package/src/view/uielement.js +2 -3
- package/src/view/upcastwriter.js +1 -1
- package/src/view/view.js +7 -7
- package/theme/placeholder.css +1 -1
- package/theme/renderer.css +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
import Observer from './observer';
|
|
6
6
|
import BubblingEventInfo from './bubblingeventinfo';
|
|
7
|
-
import { keyCodes } from '@ckeditor/ckeditor5-utils
|
|
7
|
+
import { keyCodes } from '@ckeditor/ckeditor5-utils';
|
|
8
8
|
/**
|
|
9
9
|
* Tab observer introduces the {@link module:engine/view/document~Document#event:tab `Document#tab`} event.
|
|
10
10
|
*
|
package/src/view/placeholder.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/position.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module engine/view/position
|
|
7
7
|
*/
|
|
8
8
|
import TypeCheckable from './typecheckable';
|
|
9
|
-
import compareArrays from '@ckeditor/ckeditor5-utils
|
|
10
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
9
|
+
import { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';
|
|
11
10
|
import EditableElement from './editableelement';
|
|
12
11
|
// To check if component is loaded more than once.
|
|
13
12
|
import '@ckeditor/ckeditor5-utils/src/version';
|
package/src/view/range.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/rawelement.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import Element from './element';
|
|
9
9
|
import Node from './node';
|
|
10
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils
|
|
10
|
+
import { CKEditorError } from '@ckeditor/ckeditor5-utils';
|
|
11
11
|
/**
|
|
12
12
|
* The raw element class.
|
|
13
13
|
*
|
package/src/view/renderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
@@ -8,16 +8,7 @@
|
|
|
8
8
|
import ViewText from './text';
|
|
9
9
|
import ViewPosition from './position';
|
|
10
10
|
import { INLINE_FILLER, INLINE_FILLER_LENGTH, startsWithFiller, isInlineFiller } from './filler';
|
|
11
|
-
import {
|
|
12
|
-
import insertAt from '@ckeditor/ckeditor5-utils/src/dom/insertat';
|
|
13
|
-
import remove from '@ckeditor/ckeditor5-utils/src/dom/remove';
|
|
14
|
-
import { Observable } from '@ckeditor/ckeditor5-utils/src/observablemixin';
|
|
15
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
16
|
-
import isText from '@ckeditor/ckeditor5-utils/src/dom/istext';
|
|
17
|
-
import isComment from '@ckeditor/ckeditor5-utils/src/dom/iscomment';
|
|
18
|
-
import isNode from '@ckeditor/ckeditor5-utils/src/dom/isnode';
|
|
19
|
-
import fastDiff from '@ckeditor/ckeditor5-utils/src/fastdiff';
|
|
20
|
-
import env from '@ckeditor/ckeditor5-utils/src/env';
|
|
11
|
+
import { CKEditorError, ObservableMixin, diff, env, fastDiff, insertAt, isComment, isNode, isText, remove } from '@ckeditor/ckeditor5-utils';
|
|
21
12
|
import '../../theme/renderer.css';
|
|
22
13
|
/**
|
|
23
14
|
* Renderer is responsible for updating the DOM structure and the DOM selection based on
|
|
@@ -32,7 +23,7 @@ import '../../theme/renderer.css';
|
|
|
32
23
|
* Renderer uses {@link module:engine/view/domconverter~DomConverter} to transform view nodes and positions
|
|
33
24
|
* to and from the DOM.
|
|
34
25
|
*/
|
|
35
|
-
export default class Renderer extends
|
|
26
|
+
export default class Renderer extends ObservableMixin() {
|
|
36
27
|
/**
|
|
37
28
|
* Creates a renderer instance.
|
|
38
29
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/selection.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
|
-
/* eslint-disable new-cap */
|
|
6
5
|
/**
|
|
7
6
|
* @module engine/view/selection
|
|
8
7
|
*/
|
|
@@ -11,10 +10,7 @@ import Range from './range';
|
|
|
11
10
|
import Position from './position';
|
|
12
11
|
import Node from './node';
|
|
13
12
|
import DocumentSelection from './documentselection';
|
|
14
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils
|
|
15
|
-
import count from '@ckeditor/ckeditor5-utils/src/count';
|
|
16
|
-
import isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';
|
|
17
|
-
import EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';
|
|
13
|
+
import { CKEditorError, EmitterMixin, count, isIterable } from '@ckeditor/ckeditor5-utils';
|
|
18
14
|
/**
|
|
19
15
|
* Class representing an arbirtary selection in the view.
|
|
20
16
|
* See also {@link module:engine/view/documentselection~DocumentSelection}.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
import { getShorthandValues, isAttachment, isColor, isPosition, isRepeat, isURL } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
import { getShorthandValues, getBoxSidesValueReducer, getBoxSidesValues, isLength, isLineStyle } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
import { getPositionShorthandNormalizer, getBoxSidesValueReducer } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
import { getPositionShorthandNormalizer, getBoxSidesValueReducer } from './utils';
|
package/src/view/styles/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
const HEX_COLOR_REGEXP = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
package/src/view/stylesmap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/textproxy.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module engine/view/textproxy
|
|
7
7
|
*/
|
|
8
8
|
import TypeCheckable from './typecheckable';
|
|
9
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils
|
|
9
|
+
import { CKEditorError } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
/**
|
|
11
11
|
* TextProxy is a wrapper for substring of {@link module:engine/view/text~Text}. Instance of this class is created by
|
|
12
12
|
* {@link module:engine/view/treewalker~TreeWalker} when only a part of {@link module:engine/view/text~Text} needs to be returned.
|
package/src/view/treewalker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
@@ -9,7 +9,7 @@ import Element from './element';
|
|
|
9
9
|
import Text from './text';
|
|
10
10
|
import TextProxy from './textproxy';
|
|
11
11
|
import Position from './position';
|
|
12
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils
|
|
12
|
+
import { CKEditorError } from '@ckeditor/ckeditor5-utils';
|
|
13
13
|
/**
|
|
14
14
|
* Position iterator class. It allows to iterate forward and backward over the document.
|
|
15
15
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/uielement.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import Element from './element';
|
|
9
9
|
import Node from './node';
|
|
10
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils
|
|
11
|
-
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
|
|
10
|
+
import { CKEditorError, keyCodes } from '@ckeditor/ckeditor5-utils';
|
|
12
11
|
/**
|
|
13
12
|
* UI element class. It should be used to represent editing UI which needs to be injected into the editing view
|
|
14
13
|
* If possible, you should keep your UI outside the editing view. However, if that is not possible,
|
package/src/view/upcastwriter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
package/src/view/view.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
@@ -21,11 +21,9 @@ import CompositionObserver from './observer/compositionobserver';
|
|
|
21
21
|
import InputObserver from './observer/inputobserver';
|
|
22
22
|
import ArrowKeysObserver from './observer/arrowkeysobserver';
|
|
23
23
|
import TabObserver from './observer/tabobserver';
|
|
24
|
-
import {
|
|
25
|
-
import { scrollViewportToShowTarget } from '@ckeditor/ckeditor5-utils/src/dom/scroll';
|
|
24
|
+
import { CKEditorError, ObservableMixin, scrollViewportToShowTarget } from '@ckeditor/ckeditor5-utils';
|
|
26
25
|
import { injectUiElementHandling } from './uielement';
|
|
27
26
|
import { injectQuirksHandling } from './filler';
|
|
28
|
-
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
29
27
|
/**
|
|
30
28
|
* Editor's view controller class. Its main responsibility is DOM - View management for editing purposes, to provide
|
|
31
29
|
* abstraction over the DOM structure and events and hide all browsers quirks.
|
|
@@ -58,7 +56,7 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
|
58
56
|
*
|
|
59
57
|
* @mixes module:utils/observablemixin~ObservableMixin
|
|
60
58
|
*/
|
|
61
|
-
export default class View extends
|
|
59
|
+
export default class View extends ObservableMixin() {
|
|
62
60
|
/**
|
|
63
61
|
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance.
|
|
64
62
|
*/
|
|
@@ -108,7 +106,8 @@ export default class View extends Observable {
|
|
|
108
106
|
* @type {module:engine/view/renderer~Renderer}
|
|
109
107
|
*/
|
|
110
108
|
this._renderer = new Renderer(this.domConverter, this.document.selection);
|
|
111
|
-
this._renderer.bind('isFocused', 'isSelecting', 'isComposing')
|
|
109
|
+
this._renderer.bind('isFocused', 'isSelecting', 'isComposing')
|
|
110
|
+
.to(this.document, 'isFocused', 'isSelecting', 'isComposing');
|
|
112
111
|
/**
|
|
113
112
|
* A DOM root attributes cache. It saves the initial values of DOM root attributes before the DOM element
|
|
114
113
|
* is {@link module:engine/view/view~View#attachDomRoot attached} to the view so later on, when
|
|
@@ -164,8 +163,8 @@ export default class View extends Observable {
|
|
|
164
163
|
this._writer = new DowncastWriter(this.document);
|
|
165
164
|
// Add default observers.
|
|
166
165
|
this.addObserver(MutationObserver);
|
|
167
|
-
this.addObserver(SelectionObserver);
|
|
168
166
|
this.addObserver(FocusObserver);
|
|
167
|
+
this.addObserver(SelectionObserver);
|
|
169
168
|
this.addObserver(KeyObserver);
|
|
170
169
|
this.addObserver(FakeSelectionObserver);
|
|
171
170
|
this.addObserver(CompositionObserver);
|
|
@@ -452,6 +451,7 @@ export default class View extends Observable {
|
|
|
452
451
|
*/
|
|
453
452
|
forceRender() {
|
|
454
453
|
this._hasChangedSinceTheLastRendering = true;
|
|
454
|
+
this.getObserver(FocusObserver).flush();
|
|
455
455
|
this.change(() => { });
|
|
456
456
|
}
|
|
457
457
|
/**
|
package/theme/placeholder.css
CHANGED
package/theme/renderer.css
CHANGED