@ckeditor/ckeditor5-engine 45.0.0 → 45.1.0-alpha.1

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.
Files changed (49) hide show
  1. package/dist/index.js +187 -84
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -2
  4. package/src/controller/editingcontroller.js +1 -1
  5. package/src/conversion/conversion.d.ts +3 -0
  6. package/src/conversion/conversion.js +3 -0
  7. package/src/conversion/downcasthelpers.d.ts +2 -7
  8. package/src/conversion/downcasthelpers.js +8 -11
  9. package/src/dev-utils/utils.js +1 -0
  10. package/src/dev-utils/view.d.ts +1 -3
  11. package/src/dev-utils/view.js +1 -3
  12. package/src/model/documentselection.js +2 -2
  13. package/src/model/history.js +2 -1
  14. package/src/model/nodelist.js +2 -2
  15. package/src/model/operation/attributeoperation.js +5 -5
  16. package/src/model/operation/operation.d.ts +1 -1
  17. package/src/model/operation/operation.js +1 -1
  18. package/src/model/operation/rootattributeoperation.js +8 -10
  19. package/src/model/operation/transform.js +67 -10
  20. package/src/model/operation/utils.d.ts +1 -1
  21. package/src/model/operation/utils.js +1 -1
  22. package/src/model/position.js +7 -7
  23. package/src/model/range.d.ts +1 -1
  24. package/src/model/range.js +1 -1
  25. package/src/model/selection.js +2 -2
  26. package/src/model/utils/deletecontent.d.ts +13 -0
  27. package/src/model/utils/deletecontent.js +20 -1
  28. package/src/model/utils/insertcontent.d.ts +0 -1
  29. package/src/model/utils/insertcontent.js +2 -3
  30. package/src/model/utils/insertobject.d.ts +0 -1
  31. package/src/model/utils/insertobject.js +0 -1
  32. package/src/model/writer.d.ts +1 -1
  33. package/src/model/writer.js +2 -2
  34. package/src/view/domconverter.d.ts +5 -5
  35. package/src/view/domconverter.js +5 -5
  36. package/src/view/downcastwriter.d.ts +3 -2
  37. package/src/view/downcastwriter.js +3 -2
  38. package/src/view/editableelement.d.ts +1 -1
  39. package/src/view/editableelement.js +1 -1
  40. package/src/view/emptyelement.d.ts +1 -1
  41. package/src/view/emptyelement.js +1 -1
  42. package/src/view/filler.d.ts +1 -1
  43. package/src/view/filler.js +1 -1
  44. package/src/view/observer/compositionobserver.js +2 -2
  45. package/src/view/observer/inputobserver.js +29 -3
  46. package/src/view/position.js +3 -3
  47. package/src/view/renderer.js +8 -0
  48. package/src/view/textproxy.d.ts +1 -2
  49. package/src/view/textproxy.js +1 -2
@@ -39,7 +39,6 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
39
39
  * @param model The model in context of which the insertion should be performed.
40
40
  * @param content The content to insert.
41
41
  * @param selectable Selection into which the content should be inserted.
42
- * @param placeOrOffset Sets place or offset of the selection.
43
42
  * @returns Range which contains all the performed changes. This is a range that, if removed,
44
43
  * would return the model to the state before the insertion. If no changes were preformed by `insertContent`, returns a range collapsed
45
44
  * at the insertion position.
@@ -401,8 +400,8 @@ class Insertion {
401
400
  * Given node cannot be inserted on the given position.
402
401
  *
403
402
  * @error insertcontent-wrong-position
404
- * @param node Node to insert.
405
- * @param position Position to insert the node at.
403
+ * @param {module:engine/model/node~Node} node Node to insert.
404
+ * @param {module:engine/model/position~Position} position Position to insert the node at.
406
405
  */
407
406
  throw new CKEditorError('insertcontent-wrong-position', this, { node, position: this.position });
408
407
  }
@@ -23,7 +23,6 @@ import type Range from '../range.js';
23
23
  * @param object An object to be inserted into the model document.
24
24
  * @param selectable A selectable where the content should be inserted. If not specified, the current
25
25
  * {@link module:engine/model/document~Document#selection document selection} will be used instead.
26
- * @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.
27
26
  * @param options Additional options.
28
27
  * @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to
29
28
  * `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).
@@ -16,7 +16,6 @@ import { CKEditorError, first } from '@ckeditor/ckeditor5-utils';
16
16
  * @param object An object to be inserted into the model document.
17
17
  * @param selectable A selectable where the content should be inserted. If not specified, the current
18
18
  * {@link module:engine/model/document~Document#selection document selection} will be used instead.
19
- * @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.
20
19
  * @param options Additional options.
21
20
  * @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to
22
21
  * `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).
@@ -371,7 +371,7 @@ export default class Writer {
371
371
  *
372
372
  * Note that items can be moved only within the same tree. It means that you can move items within the same root
373
373
  * (element or document fragment) or between {@link module:engine/model/document~Document#roots documents roots},
374
- * but you can not move items from document fragment to the document or from one detached element to another. Use
374
+ * but you cannot move items from document fragment to the document or from one detached element to another. Use
375
375
  * {@link module:engine/model/writer~Writer#insert} in such cases.
376
376
  *
377
377
  * @param range Source range.
@@ -377,7 +377,7 @@ export default class Writer {
377
377
  *
378
378
  * Note that items can be moved only within the same tree. It means that you can move items within the same root
379
379
  * (element or document fragment) or between {@link module:engine/model/document~Document#roots documents roots},
380
- * but you can not move items from document fragment to the document or from one detached element to another. Use
380
+ * but you cannot move items from document fragment to the document or from one detached element to another. Use
381
381
  * {@link module:engine/model/writer~Writer#insert} in such cases.
382
382
  *
383
383
  * @param range Source range.
@@ -601,7 +601,7 @@ export default class Writer {
601
601
  let splitElement = position.parent;
602
602
  if (!splitElement.parent) {
603
603
  /**
604
- * Element with no parent can not be split.
604
+ * Element with no parent cannot be split.
605
605
  *
606
606
  * @error writer-split-element-no-parent
607
607
  */
@@ -294,7 +294,7 @@ export default class DomConverter {
294
294
  domSelectionToView(domSelection: DomSelection): ViewSelection;
295
295
  /**
296
296
  * Converts DOM Range to view {@link module:engine/view/range~Range}.
297
- * If the start or end position can not be converted `null` is returned.
297
+ * If the start or end position cannot be converted `null` is returned.
298
298
  *
299
299
  * @param domRange DOM range.
300
300
  * @returns View range.
@@ -442,7 +442,7 @@ export default class DomConverter {
442
442
  /**
443
443
  * Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.
444
444
  *
445
- * @param DOM Selection instance to check.
445
+ * @param selection Selection instance to check.
446
446
  */
447
447
  isDomSelectionBackward(selection: DomSelection): boolean;
448
448
  /**
@@ -660,7 +660,7 @@ export {};
660
660
  * ```
661
661
  *
662
662
  * @error domconverter-unsafe-attribute-detected
663
- * @param domElement The DOM element the attribute was set on.
664
- * @param key The original name of the attribute
665
- * @param value The value of the original attribute
663
+ * @param {HTMLElement} domElement The DOM element the attribute was set on.
664
+ * @param {string} key The original name of the attribute
665
+ * @param {string} value The value of the original attribute
666
666
  */
@@ -646,7 +646,7 @@ export default class DomConverter {
646
646
  }
647
647
  /**
648
648
  * Converts DOM Range to view {@link module:engine/view/range~Range}.
649
- * If the start or end position can not be converted `null` is returned.
649
+ * If the start or end position cannot be converted `null` is returned.
650
650
  *
651
651
  * @param domRange DOM range.
652
652
  * @returns View range.
@@ -942,7 +942,7 @@ export default class DomConverter {
942
942
  /**
943
943
  * Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.
944
944
  *
945
- * @param DOM Selection instance to check.
945
+ * @param selection Selection instance to check.
946
946
  */
947
947
  isDomSelectionBackward(selection) {
948
948
  if (selection.isCollapsed) {
@@ -1643,7 +1643,7 @@ function isGeckoRestrictedDomSelection(domSelection) {
1643
1643
  * ```
1644
1644
  *
1645
1645
  * @error domconverter-unsafe-attribute-detected
1646
- * @param domElement The DOM element the attribute was set on.
1647
- * @param key The original name of the attribute
1648
- * @param value The value of the original attribute
1646
+ * @param {HTMLElement} domElement The DOM element the attribute was set on.
1647
+ * @param {string} key The original name of the attribute
1648
+ * @param {string} value The value of the original attribute
1649
1649
  */
@@ -164,7 +164,8 @@ export default class DowncastWriter {
164
164
  * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}
165
165
  * parameters.
166
166
  *
167
- * @param Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~Item view item}.
167
+ * @param itemOrPosition
168
+ * @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~Item view item}.
168
169
  */
169
170
  setSelectionFocus(itemOrPosition: Item | Position, offset?: PositionOffset): void;
170
171
  /**
@@ -893,7 +894,7 @@ export default class DowncastWriter {
893
894
  * conversionApi.writer.insert( viewPosition, viewSlot );
894
895
  * ```
895
896
  *
896
- * While providing a filtered slot, make sure to provide slots for all child nodes. A single node can not be downcasted into
897
+ * While providing a filtered slot, make sure to provide slots for all child nodes. A single node cannot be downcasted into
897
898
  * multiple slots.
898
899
  *
899
900
  * **Note**: You should not change the order of nodes. View elements should be in the same order as model nodes.
@@ -62,7 +62,8 @@ export default class DowncastWriter {
62
62
  * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}
63
63
  * parameters.
64
64
  *
65
- * @param Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~Item view item}.
65
+ * @param itemOrPosition
66
+ * @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~Item view item}.
66
67
  */
67
68
  setSelectionFocus(itemOrPosition, offset) {
68
69
  this.document.selection._setFocus(itemOrPosition, offset);
@@ -910,7 +911,7 @@ export default class DowncastWriter {
910
911
  * conversionApi.writer.insert( viewPosition, viewSlot );
911
912
  * ```
912
913
  *
913
- * While providing a filtered slot, make sure to provide slots for all child nodes. A single node can not be downcasted into
914
+ * While providing a filtered slot, make sure to provide slots for all child nodes. A single node cannot be downcasted into
914
915
  * multiple slots.
915
916
  *
916
917
  * **Note**: You should not change the order of nodes. View elements should be in the same order as model nodes.
@@ -53,7 +53,7 @@ export default class EditableElement extends /* #__PURE__ */ EditableElement_bas
53
53
  * @internal
54
54
  * @param document The document instance to which this element belongs.
55
55
  * @param name Node name.
56
- * @param attrs Collection of attributes.
56
+ * @param attributes Collection of attributes.
57
57
  * @param children A list of nodes to be inserted into created element.
58
58
  */
59
59
  constructor(document: Document, name: string, attributes?: ElementAttributes, children?: Node | Iterable<Node>);
@@ -24,7 +24,7 @@ export default class EditableElement extends /* #__PURE__ */ ObservableMixin(Con
24
24
  * @internal
25
25
  * @param document The document instance to which this element belongs.
26
26
  * @param name Node name.
27
- * @param attrs Collection of attributes.
27
+ * @param attributes Collection of attributes.
28
28
  * @param children A list of nodes to be inserted into created element.
29
29
  */
30
30
  constructor(document, name, attributes, children) {
@@ -26,7 +26,7 @@ export default class EmptyElement extends Element {
26
26
  * @internal
27
27
  * @param document The document instance to which this element belongs.
28
28
  * @param name Node name.
29
- * @param attrs Collection of attributes.
29
+ * @param attributes Collection of attributes.
30
30
  * @param children A list of nodes to be inserted into created element.
31
31
  */
32
32
  constructor(document: Document, name: string, attributes?: ElementAttributes, children?: Node | Iterable<Node>);
@@ -25,7 +25,7 @@ export default class EmptyElement extends Element {
25
25
  * @internal
26
26
  * @param document The document instance to which this element belongs.
27
27
  * @param name Node name.
28
- * @param attrs Collection of attributes.
28
+ * @param attributes Collection of attributes.
29
29
  * @param children A list of nodes to be inserted into created element.
30
30
  */
31
31
  constructor(document, name, attributes, children) {
@@ -13,7 +13,7 @@ import type View from './view.js';
13
13
  * * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,
14
14
  * as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that
15
15
  * it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be
16
- * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it can not be used
16
+ * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it cannot be used
17
17
  * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other
18
18
  * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or
19
19
  * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.
@@ -13,7 +13,7 @@ import { keyCodes, isText } from '@ckeditor/ckeditor5-utils';
13
13
  * * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,
14
14
  * as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that
15
15
  * it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be
16
- * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it can not be used
16
+ * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it cannot be used
17
17
  * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other
18
18
  * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or
19
19
  * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.
@@ -33,7 +33,7 @@ export default class CompositionObserver extends DomEventObserver {
33
33
  // @if CK_DEBUG_TYPING // ) );
34
34
  // @if CK_DEBUG_TYPING // }
35
35
  document.isComposing = true;
36
- }, { priority: 'low' });
36
+ });
37
37
  document.on('compositionend', () => {
38
38
  // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
39
39
  // @if CK_DEBUG_TYPING // console.log( ..._buildLogMessage( this, 'CompositionObserver',
@@ -42,7 +42,7 @@ export default class CompositionObserver extends DomEventObserver {
42
42
  // @if CK_DEBUG_TYPING // ) );
43
43
  // @if CK_DEBUG_TYPING // }
44
44
  document.isComposing = false;
45
- }, { priority: 'low' });
45
+ });
46
46
  }
47
47
  /**
48
48
  * @inheritDoc
@@ -8,6 +8,7 @@
8
8
  import DomEventObserver from './domeventobserver.js';
9
9
  import DataTransfer from '../datatransfer.js';
10
10
  import { env } from '@ckeditor/ckeditor5-utils';
11
+ import { INLINE_FILLER_LENGTH, startsWithFiller } from '../filler.js';
11
12
  // @if CK_DEBUG_TYPING // const { _debouncedLine, _buildLogMessage } = require( '../../dev-utils/utils.js' );
12
13
  /**
13
14
  * Observer for events connected with data input.
@@ -27,7 +28,7 @@ export default class InputObserver extends DomEventObserver {
27
28
  // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
28
29
  // @if CK_DEBUG_TYPING // _debouncedLine();
29
30
  // @if CK_DEBUG_TYPING // console.group( ..._buildLogMessage( this, 'InputObserver',
30
- // @if CK_DEBUG_TYPING // `${ domEvent.type }: ${ domEvent.inputType }`
31
+ // @if CK_DEBUG_TYPING // `${ domEvent.type }: ${ domEvent.inputType } - ${ domEvent.isComposing ? 'is' : 'not' } composing`,
31
32
  // @if CK_DEBUG_TYPING // ) );
32
33
  // @if CK_DEBUG_TYPING // }
33
34
  const domTargetRanges = domEvent.getTargetRanges();
@@ -64,6 +65,8 @@ export default class InputObserver extends DomEventObserver {
64
65
  if (viewDocument.selection.isFake) {
65
66
  // Future-proof: in case of multi-range fake selections being possible.
66
67
  targetRanges = Array.from(viewDocument.selection.getRanges());
68
+ // Do not allow typing inside a fake selection container, we will handle it manually.
69
+ domEvent.preventDefault();
67
70
  // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
68
71
  // @if CK_DEBUG_TYPING // console.info( ..._buildLogMessage( this, 'InputObserver',
69
72
  // @if CK_DEBUG_TYPING // '%cusing fake selection:',
@@ -79,8 +82,31 @@ export default class InputObserver extends DomEventObserver {
79
82
  // We try to fall back to collapsed range at the valid end position.
80
83
  // See https://github.com/ckeditor/ckeditor5/issues/14411.
81
84
  // See https://github.com/ckeditor/ckeditor5/issues/14050.
82
- const viewStart = view.domConverter.domPositionToView(domRange.startContainer, domRange.startOffset);
85
+ let viewStart = view.domConverter.domPositionToView(domRange.startContainer, domRange.startOffset);
83
86
  const viewEnd = view.domConverter.domPositionToView(domRange.endContainer, domRange.endOffset);
87
+ // When text replacement is enabled and browser tries to replace double space with dot, and space,
88
+ // but the first space is no longer where browser put it (it was moved to an attribute element),
89
+ // then we must extend the target range so it does not include a part of an inline filler.
90
+ if (viewStart && startsWithFiller(domRange.startContainer) && domRange.startOffset < INLINE_FILLER_LENGTH) {
91
+ // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
92
+ // @if CK_DEBUG_TYPING // console.info( ..._buildLogMessage( this, 'InputObserver',
93
+ // @if CK_DEBUG_TYPING // 'Target range starts in an inline filler - adjusting it',
94
+ // @if CK_DEBUG_TYPING // ) );
95
+ // @if CK_DEBUG_TYPING // }
96
+ domEvent.preventDefault();
97
+ let count = INLINE_FILLER_LENGTH - domRange.startOffset;
98
+ viewStart = viewStart.getLastMatchingPosition(value => {
99
+ // Ignore attribute and UI elements but stop on container elements.
100
+ if (value.item.is('attributeElement') || value.item.is('uiElement')) {
101
+ return true;
102
+ }
103
+ // Skip as many characters as inline filler was overlapped.
104
+ if (value.item.is('$textProxy') && count--) {
105
+ return true;
106
+ }
107
+ return false;
108
+ }, { direction: 'backward', singleCharacters: true });
109
+ }
84
110
  if (viewStart) {
85
111
  return view.createRange(viewStart, viewEnd);
86
112
  }
@@ -126,7 +152,7 @@ export default class InputObserver extends DomEventObserver {
126
152
  }
127
153
  // Normalize the insertText data that includes new-line characters.
128
154
  // https://github.com/ckeditor/ckeditor5/issues/2045.
129
- if (domEvent.inputType == 'insertText' && data && data.includes('\n')) {
155
+ if (['insertText', 'insertReplacementText'].includes(domEvent.inputType) && data && data.includes('\n')) {
130
156
  // There might be a single new-line or double for new paragraph, but we translate
131
157
  // it to paragraphs as it is our default action for enter handling.
132
158
  const parts = data.split(/\n{1,2}/g);
@@ -291,10 +291,10 @@ export default class Position extends TypeCheckable {
291
291
  }
292
292
  if (!item.parent) {
293
293
  /**
294
- * You can not make a position after a root.
294
+ * You cannot make a position after a root.
295
295
  *
296
296
  * @error view-position-after-root
297
- * @param {module:engine/view/node~Node} root
297
+ * @param {module:engine/view/node~Node} root A root item.
298
298
  */
299
299
  throw new CKEditorError('view-position-after-root', item, { root: item });
300
300
  }
@@ -316,7 +316,7 @@ export default class Position extends TypeCheckable {
316
316
  * You cannot make a position before a root.
317
317
  *
318
318
  * @error view-position-before-root
319
- * @param {module:engine/view/node~Node} root
319
+ * @param {module:engine/view/node~Node} root A root item.
320
320
  */
321
321
  throw new CKEditorError('view-position-before-root', item, { root: item });
322
322
  }
@@ -366,6 +366,14 @@ export default class Renderer extends /* #__PURE__ */ ObservableMixin() {
366
366
  const domFillerNode = this._inlineFiller;
367
367
  // Something weird happened and the stored node doesn't contain the filler's text.
368
368
  if (!startsWithFiller(domFillerNode)) {
369
+ // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {
370
+ // @if CK_DEBUG_TYPING // console.log( ..._buildLogMessage( this, 'Renderer',
371
+ // @if CK_DEBUG_TYPING // 'Inline filler node: ' +
372
+ // @if CK_DEBUG_TYPING // `%c${ _escapeTextNodeData( domFillerNode.data ) }%c (${ domFillerNode.data.length })`,
373
+ // @if CK_DEBUG_TYPING // 'color: blue',
374
+ // @if CK_DEBUG_TYPING // ''
375
+ // @if CK_DEBUG_TYPING // ) );
376
+ // @if CK_DEBUG_TYPING // }
369
377
  /**
370
378
  * The inline filler node was lost. Most likely, something overwrote the filler text node
371
379
  * in the DOM.
@@ -25,7 +25,7 @@ import type Text from './text.js';
25
25
  *
26
26
  * **Note:** `TextProxy` instances are created on the fly basing on the current state of parent {@link module:engine/view/text~Text}.
27
27
  * Because of this it is highly unrecommended to store references to `TextProxy instances because they might get
28
- * invalidated due to operations on Document. Also TextProxy is not a {@link module:engine/view/node~Node} so it can not be
28
+ * invalidated due to operations on Document. Also TextProxy is not a {@link module:engine/view/node~Node} so it cannot be
29
29
  * inserted as a child of {@link module:engine/view/element~Element}.
30
30
  *
31
31
  * `TextProxy` instances are created by {@link module:engine/view/treewalker~TreeWalker view tree walker}. You should not need to create
@@ -52,7 +52,6 @@ export default class TextProxy extends TypeCheckable {
52
52
  * @param offsetInText Offset in {@link module:engine/view/textproxy~TextProxy#textNode text node}
53
53
  * from which the text proxy starts.
54
54
  * @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.
55
- * @constructor
56
55
  */
57
56
  constructor(textNode: Text, offsetInText: number, length: number);
58
57
  /**
@@ -21,7 +21,7 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
21
21
  *
22
22
  * **Note:** `TextProxy` instances are created on the fly basing on the current state of parent {@link module:engine/view/text~Text}.
23
23
  * Because of this it is highly unrecommended to store references to `TextProxy instances because they might get
24
- * invalidated due to operations on Document. Also TextProxy is not a {@link module:engine/view/node~Node} so it can not be
24
+ * invalidated due to operations on Document. Also TextProxy is not a {@link module:engine/view/node~Node} so it cannot be
25
25
  * inserted as a child of {@link module:engine/view/element~Element}.
26
26
  *
27
27
  * `TextProxy` instances are created by {@link module:engine/view/treewalker~TreeWalker view tree walker}. You should not need to create
@@ -48,7 +48,6 @@ export default class TextProxy extends TypeCheckable {
48
48
  * @param offsetInText Offset in {@link module:engine/view/textproxy~TextProxy#textNode text node}
49
49
  * from which the text proxy starts.
50
50
  * @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.
51
- * @constructor
52
51
  */
53
52
  constructor(textNode, offsetInText, length) {
54
53
  super();