@ckeditor/ckeditor5-typing 47.3.0-alpha.7 → 47.4.0-alpha.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/dist/index-content.css +1 -1
- package/dist/index-editor.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/delete.d.ts +1 -1
- package/src/delete.js +1 -1
- package/src/deletecommand.d.ts +1 -1
- package/src/deletecommand.js +1 -1
- package/src/deleteobserver.d.ts +1 -1
- package/src/deleteobserver.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/input.d.ts +1 -1
- package/src/input.js +13 -2
- package/src/inserttextcommand.d.ts +1 -1
- package/src/inserttextcommand.js +1 -1
- package/src/inserttextobserver.d.ts +1 -1
- package/src/inserttextobserver.js +1 -1
- package/src/texttransformation.d.ts +1 -1
- package/src/texttransformation.js +6 -3
- package/src/textwatcher.d.ts +1 -1
- package/src/textwatcher.js +1 -1
- package/src/twostepcaretmovement.d.ts +1 -1
- package/src/twostepcaretmovement.js +1 -1
- package/src/typing.d.ts +1 -1
- package/src/typing.js +1 -1
- package/src/typingconfig.d.ts +1 -1
- package/src/typingconfig.js +1 -1
- package/src/utils/changebuffer.d.ts +1 -1
- package/src/utils/changebuffer.js +1 -1
- package/src/utils/findattributerange.d.ts +1 -1
- package/src/utils/findattributerange.js +1 -1
- package/src/utils/getlasttextline.d.ts +1 -1
- package/src/utils/getlasttextline.js +1 -1
- package/src/utils/inlinehighlight.d.ts +1 -1
- package/src/utils/inlinehighlight.js +1 -1
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 Typing feature** (https://github.com/ckeditor/ckeditor5)<br>
|
|
5
|
-
Copyright (c) 2003–
|
|
5
|
+
Copyright (c) 2003–2026, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
Licensed under a dual-license model, this software is available under:
|
|
8
8
|
|
package/dist/index-content.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
package/dist/index-editor.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
package/dist/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
|
|
@@ -8,7 +8,7 @@ import { Observer, FocusObserver, ViewDocumentDomEventData, _tryFixingModelRange
|
|
|
8
8
|
import { debounce, escapeRegExp } from 'es-toolkit/compat';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @license Copyright (c) 2003-
|
|
11
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
12
12
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
13
13
|
*/ /**
|
|
14
14
|
* @module typing/utils/changebuffer
|
|
@@ -389,8 +389,19 @@ const TYPING_INPUT_TYPES_ANDROID = [
|
|
|
389
389
|
let modelRanges;
|
|
390
390
|
// If view selection was specified, translate it to model selection.
|
|
391
391
|
if (viewSelection) {
|
|
392
|
-
modelRanges = Array.from(viewSelection.getRanges()).
|
|
393
|
-
|
|
392
|
+
modelRanges = Array.from(viewSelection.getRanges()).filter((viewRange)=>{
|
|
393
|
+
// On Windows 11 with the US International keyboard, events are batched.
|
|
394
|
+
// In other words, the first backtick press does not send an `insertText` event,
|
|
395
|
+
// and only the second one sends it double (batched).
|
|
396
|
+
// This causes a race condition if during the first backtick insert the element is removed from the tree,
|
|
397
|
+
// and the second event flushes changes, and it's original targetRanges,
|
|
398
|
+
// which were initially good, now refer to a removed element.
|
|
399
|
+
// This is not reproducible on Mac/Linux as they enter composition mode.
|
|
400
|
+
// See more: https://github.com/ckeditor/ckeditor5/issues/18926.
|
|
401
|
+
return viewRange.root.is('rootElement');
|
|
402
|
+
}).map((viewRange)=>mapper.toModelRange(viewRange)).map((modelRange)=>_tryFixingModelRange(modelRange, model.schema) || modelRange);
|
|
403
|
+
}
|
|
404
|
+
if (!modelRanges || !modelRanges.length) {
|
|
394
405
|
modelRanges = Array.from(modelSelection.getRanges());
|
|
395
406
|
}
|
|
396
407
|
let insertText = text;
|
|
@@ -1331,7 +1342,7 @@ const DELETE_EVENT_TYPES = {
|
|
|
1331
1342
|
}
|
|
1332
1343
|
|
|
1333
1344
|
/**
|
|
1334
|
-
* @license Copyright (c) 2003-
|
|
1345
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
1335
1346
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
1336
1347
|
*/ /**
|
|
1337
1348
|
* @module typing/utils/getlasttextline
|
|
@@ -2346,8 +2357,11 @@ const DEFAULT_TRANSFORMATIONS = [
|
|
|
2346
2357
|
const model = this.editor.model;
|
|
2347
2358
|
const modelSelection = model.document.selection;
|
|
2348
2359
|
modelSelection.on('change:range', ()=>{
|
|
2349
|
-
// Disable plugin when selection is inside a code block.
|
|
2350
|
-
|
|
2360
|
+
// Disable plugin when selection is inside a code block or inline code.
|
|
2361
|
+
const anchor = modelSelection.anchor;
|
|
2362
|
+
const isInCodeBlock = !!anchor && anchor.parent.is('element', 'codeBlock');
|
|
2363
|
+
const isInInlineCode = modelSelection.hasAttribute('code');
|
|
2364
|
+
this.isEnabled = !(isInCodeBlock || isInInlineCode);
|
|
2351
2365
|
});
|
|
2352
2366
|
this._enableTransformationWatchers();
|
|
2353
2367
|
}
|
|
@@ -2474,7 +2488,7 @@ const DEFAULT_TRANSFORMATIONS = [
|
|
|
2474
2488
|
}
|
|
2475
2489
|
|
|
2476
2490
|
/**
|
|
2477
|
-
* @license Copyright (c) 2003-
|
|
2491
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2478
2492
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2479
2493
|
*/ /**
|
|
2480
2494
|
* @module typing/utils/findattributerange
|