@ckeditor/ckeditor5-core 47.6.2-alpha.0 → 47.6.2-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.
- package/LICENSE.md +2 -5
- package/README.md +4 -7
- package/dist/index.js +23 -18
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/editor/editor.d.ts +1 -16
- package/src/editor/editor.js +24 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-core",
|
|
3
|
-
"version": "47.6.2-alpha.
|
|
3
|
+
"version": "47.6.2-alpha.1",
|
|
4
4
|
"description": "The core architecture of CKEditor 5 – the best browser-based rich text editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wysiwyg",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "src/index.js",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ckeditor/ckeditor5-engine": "47.6.2-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "47.6.2-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "47.6.2-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-watchdog": "47.6.2-alpha.
|
|
27
|
+
"@ckeditor/ckeditor5-engine": "47.6.2-alpha.1",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "47.6.2-alpha.1",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "47.6.2-alpha.1",
|
|
30
|
+
"@ckeditor/ckeditor5-watchdog": "47.6.2-alpha.1",
|
|
31
31
|
"es-toolkit": "1.39.5"
|
|
32
32
|
},
|
|
33
33
|
"author": "CKSource (http://cksource.com/)",
|
package/src/editor/editor.d.ts
CHANGED
|
@@ -474,7 +474,7 @@ export declare abstract class Editor extends /* #__PURE__ */ Editor_base {
|
|
|
474
474
|
/**
|
|
475
475
|
* @internal
|
|
476
476
|
*/
|
|
477
|
-
export type LicenseErrorReason = 'invalid' | 'expired' | 'domainLimit' | 'pluginNotAllowed' | 'featureNotAllowed' | 'evaluationLimit' | 'trialLimit' | 'developmentLimit' | 'usageLimit' | 'distributionChannel';
|
|
477
|
+
export type LicenseErrorReason = 'invalid' | 'expired' | 'domainLimit' | 'pluginNotAllowed' | 'featureNotAllowed' | 'evaluationLimit' | 'trialLimit' | 'developmentLimit' | 'usageLimit' | 'distributionChannel' | 'lts';
|
|
478
478
|
/**
|
|
479
479
|
* Fired when the {@link module:engine/controller/datacontroller~DataController#event:ready data} and all additional
|
|
480
480
|
* editor components are ready.
|
|
@@ -539,18 +539,3 @@ export {};
|
|
|
539
539
|
*
|
|
540
540
|
* @error editor-wrong-element
|
|
541
541
|
*/
|
|
542
|
-
/**
|
|
543
|
-
* You are running [CKEditor 5 Long-term Support Edition (LTS)](https://ckeditor.com/ckeditor-5-lts/),
|
|
544
|
-
* but the provided license key does not include access to the LTS version, or the key is invalid.
|
|
545
|
-
*
|
|
546
|
-
* Please ensure that it is copied correctly from the [Customer Portal](http://portal.ckeditor.com/),
|
|
547
|
-
* and if the issue persists, please [contact our customer support](https://ckeditor.com/contact/).
|
|
548
|
-
*
|
|
549
|
-
* In case you intended to use the [LTS Edition](https://ckeditor.com/ckeditor-5-lts/),
|
|
550
|
-
* but have not yet made a purchase, please [contact our sales team](https://ckeditor.com/contact-sales/)
|
|
551
|
-
*
|
|
552
|
-
* If you did not intend to use LTS, please switch to non-LTS edition, for example,
|
|
553
|
-
* the [latest](https://ckeditor.com/docs/ckeditor5/latest/updating/guides/changelog.html) build.
|
|
554
|
-
*
|
|
555
|
-
* @error license-key-lts-not-allowed
|
|
556
|
-
*/
|
package/src/editor/editor.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module core/editor/editor
|
|
7
7
|
*/
|
|
8
8
|
import { set, get } from 'es-toolkit/compat';
|
|
9
|
-
import { Config, CKEditorError, ObservableMixin, logError, releaseDate, toArray, uid, crc32, decodeLicenseKey, isFeatureBlockedByLicenseKey } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import { Config, CKEditorError, ObservableMixin, logError, releaseDate, toArray, uid, crc32, decodeLicenseKey, isFeatureAllowedByLicenseKey, isFeatureBlockedByLicenseKey } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
import { Conversion, DataController, EditingController, Model, StylesProcessor } from '@ckeditor/ckeditor5-engine';
|
|
11
11
|
import { ContextWatchdog, EditorWatchdog } from '@ckeditor/ckeditor5-watchdog';
|
|
12
12
|
import { Context } from '../context.js';
|
|
@@ -375,9 +375,7 @@ export class Editor extends /* #__PURE__ */ ObservableMixin() {
|
|
|
375
375
|
'For production usage, please obtain a production license at https://portal.ckeditor.com/');
|
|
376
376
|
}
|
|
377
377
|
if (licenseKey == 'GPL') {
|
|
378
|
-
|
|
379
|
-
blockEditor('distributionChannel');
|
|
380
|
-
}
|
|
378
|
+
blockEditor('lts');
|
|
381
379
|
return;
|
|
382
380
|
}
|
|
383
381
|
const licensePayload = decodeLicenseKey(licenseKey);
|
|
@@ -389,6 +387,10 @@ export class Editor extends /* #__PURE__ */ ObservableMixin() {
|
|
|
389
387
|
blockEditor('invalid');
|
|
390
388
|
return;
|
|
391
389
|
}
|
|
390
|
+
if (!isFeatureAllowedByLicenseKey(licensePayload, 'LTS')) {
|
|
391
|
+
blockEditor('lts');
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
392
394
|
if (licensePayload.distributionChannel && !toArray(licensePayload.distributionChannel).includes(distributionChannel)) {
|
|
393
395
|
blockEditor('distributionChannel');
|
|
394
396
|
return;
|
|
@@ -931,6 +933,24 @@ export class Editor extends /* #__PURE__ */ ObservableMixin() {
|
|
|
931
933
|
*/
|
|
932
934
|
throw new CKEditorError('license-key-invalid-distribution-channel');
|
|
933
935
|
}
|
|
936
|
+
if (reason == 'lts') {
|
|
937
|
+
/**
|
|
938
|
+
* You are running [CKEditor 5 Long-term Support Edition (LTS)](https://ckeditor.com/ckeditor-5-lts/),
|
|
939
|
+
* but the provided license key does not include access to the LTS version, or the key is invalid.
|
|
940
|
+
*
|
|
941
|
+
* Please ensure that it is copied correctly from the [Customer Portal](http://portal.ckeditor.com/),
|
|
942
|
+
* and if the issue persists, please [contact our customer support](https://ckeditor.com/contact/).
|
|
943
|
+
*
|
|
944
|
+
* In case you intended to use the [LTS Edition](https://ckeditor.com/ckeditor-5-lts/),
|
|
945
|
+
* but have not yet made a purchase, please [contact our sales team](https://ckeditor.com/contact-sales/)
|
|
946
|
+
*
|
|
947
|
+
* If you did not intend to use LTS, please switch to non-LTS edition, for example,
|
|
948
|
+
* the [latest](https://ckeditor.com/docs/ckeditor5/latest/updating/guides/changelog.html) build.
|
|
949
|
+
*
|
|
950
|
+
* @error license-key-lts-not-allowed
|
|
951
|
+
*/
|
|
952
|
+
throw new CKEditorError('license-key-lts-not-allowed');
|
|
953
|
+
}
|
|
934
954
|
/* istanbul ignore next -- @preserve */
|
|
935
955
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
936
956
|
const unreachable = reason;
|
|
@@ -993,18 +1013,3 @@ function collectUsageData(editor) {
|
|
|
993
1013
|
*
|
|
994
1014
|
* @error editor-wrong-element
|
|
995
1015
|
*/
|
|
996
|
-
/**
|
|
997
|
-
* You are running [CKEditor 5 Long-term Support Edition (LTS)](https://ckeditor.com/ckeditor-5-lts/),
|
|
998
|
-
* but the provided license key does not include access to the LTS version, or the key is invalid.
|
|
999
|
-
*
|
|
1000
|
-
* Please ensure that it is copied correctly from the [Customer Portal](http://portal.ckeditor.com/),
|
|
1001
|
-
* and if the issue persists, please [contact our customer support](https://ckeditor.com/contact/).
|
|
1002
|
-
*
|
|
1003
|
-
* In case you intended to use the [LTS Edition](https://ckeditor.com/ckeditor-5-lts/),
|
|
1004
|
-
* but have not yet made a purchase, please [contact our sales team](https://ckeditor.com/contact-sales/)
|
|
1005
|
-
*
|
|
1006
|
-
* If you did not intend to use LTS, please switch to non-LTS edition, for example,
|
|
1007
|
-
* the [latest](https://ckeditor.com/docs/ckeditor5/latest/updating/guides/changelog.html) build.
|
|
1008
|
-
*
|
|
1009
|
-
* @error license-key-lts-not-allowed
|
|
1010
|
-
*/
|