@ckeditor/ckeditor5-core 41.4.2 → 42.0.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.
- package/README.md +6 -0
- package/dist/index.js +1625 -1161
- package/dist/index.js.map +1 -1
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/types/command.d.ts +1 -1
- package/dist/types/contextplugin.d.ts +1 -1
- package/dist/types/editor/editor.d.ts +21 -2
- package/dist/types/editor/editorconfig.d.ts +55 -39
- package/dist/types/pendingactions.d.ts +2 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/plugincollection.d.ts +1 -1
- package/lang/contexts.json +2 -0
- package/lang/translations/af.po +8 -0
- package/lang/translations/ar.po +8 -0
- package/lang/translations/ast.po +8 -0
- package/lang/translations/az.po +8 -0
- package/lang/translations/bg.po +8 -0
- package/lang/translations/bn.po +8 -0
- package/lang/translations/bs.po +8 -0
- package/lang/translations/ca.po +8 -0
- package/lang/translations/cs.po +8 -0
- package/lang/translations/da.po +8 -0
- package/lang/translations/de-ch.po +8 -0
- package/lang/translations/de.po +8 -0
- package/lang/translations/el.po +8 -0
- package/lang/translations/en-au.po +8 -0
- package/lang/translations/en-gb.po +8 -0
- package/lang/translations/en.po +8 -0
- package/lang/translations/eo.po +8 -0
- package/lang/translations/es-co.po +8 -0
- package/lang/translations/es.po +8 -0
- package/lang/translations/et.po +8 -0
- package/lang/translations/eu.po +8 -0
- package/lang/translations/fa.po +8 -0
- package/lang/translations/fi.po +8 -0
- package/lang/translations/fr.po +8 -0
- package/lang/translations/gl.po +8 -0
- package/lang/translations/gu.po +8 -0
- package/lang/translations/he.po +8 -0
- package/lang/translations/hi.po +8 -0
- package/lang/translations/hr.po +8 -0
- package/lang/translations/hu.po +8 -0
- package/lang/translations/hy.po +8 -0
- package/lang/translations/id.po +8 -0
- package/lang/translations/it.po +8 -0
- package/lang/translations/ja.po +8 -0
- package/lang/translations/jv.po +8 -0
- package/lang/translations/km.po +8 -0
- package/lang/translations/kn.po +8 -0
- package/lang/translations/ko.po +8 -0
- package/lang/translations/ku.po +8 -0
- package/lang/translations/lt.po +8 -0
- package/lang/translations/lv.po +8 -0
- package/lang/translations/ms.po +8 -0
- package/lang/translations/nb.po +8 -0
- package/lang/translations/ne.po +8 -0
- package/lang/translations/nl.po +8 -0
- package/lang/translations/no.po +8 -0
- package/lang/translations/oc.po +8 -0
- package/lang/translations/pl.po +8 -0
- package/lang/translations/pt-br.po +8 -0
- package/lang/translations/pt.po +8 -0
- package/lang/translations/ro.po +8 -0
- package/lang/translations/ru.po +8 -0
- package/lang/translations/si.po +8 -0
- package/lang/translations/sk.po +8 -0
- package/lang/translations/sl.po +8 -0
- package/lang/translations/sq.po +8 -0
- package/lang/translations/sr-latn.po +8 -0
- package/lang/translations/sr.po +8 -0
- package/lang/translations/sv.po +8 -0
- package/lang/translations/th.po +8 -0
- package/lang/translations/ti.po +8 -0
- package/lang/translations/tk.po +8 -0
- package/lang/translations/tr.po +8 -0
- package/lang/translations/tt.po +8 -0
- package/lang/translations/ug.po +8 -0
- package/lang/translations/uk.po +8 -0
- package/lang/translations/ur.po +8 -0
- package/lang/translations/uz.po +8 -0
- package/lang/translations/vi.po +8 -0
- package/lang/translations/zh-cn.po +8 -0
- package/lang/translations/zh.po +8 -0
- package/package.json +4 -3
- package/src/command.d.ts +1 -1
- package/src/command.js +1 -1
- package/src/contextplugin.d.ts +1 -1
- package/src/contextplugin.js +1 -1
- package/src/editor/editor.d.ts +21 -2
- package/src/editor/editor.js +22 -2
- package/src/editor/editorconfig.d.ts +55 -39
- package/src/pendingactions.d.ts +2 -1
- package/src/pendingactions.js +2 -1
- package/src/plugin.d.ts +1 -1
- package/src/plugin.js +1 -1
- package/src/plugincollection.d.ts +1 -1
- package/src/plugincollection.js +10 -10
package/lang/translations/vi.po
CHANGED
|
@@ -69,6 +69,14 @@ msgctxt "The label for the replace image with the file manager toolbar button."
|
|
|
69
69
|
msgid "Replace image with file manager"
|
|
70
70
|
msgstr "Thay thế hình ảnh bằng trình quản lý tập tin"
|
|
71
71
|
|
|
72
|
+
msgctxt "The label for a button that opens a file manager in order to insert a file."
|
|
73
|
+
msgid "File"
|
|
74
|
+
msgstr "Tệp"
|
|
75
|
+
|
|
76
|
+
msgctxt "The label for the insert image with the file manager menu bar button (inside 'Insert' menu)"
|
|
77
|
+
msgid "With file manager"
|
|
78
|
+
msgstr ""
|
|
79
|
+
|
|
72
80
|
msgctxt "The button label for the object (e.g. image, table) toolbar for hiding the attached caption."
|
|
73
81
|
msgid "Toggle caption off"
|
|
74
82
|
msgstr "Ẩn chú thích"
|
|
@@ -69,6 +69,14 @@ msgctxt "The label for the replace image with the file manager toolbar button."
|
|
|
69
69
|
msgid "Replace image with file manager"
|
|
70
70
|
msgstr "使用文件管理器替换图片"
|
|
71
71
|
|
|
72
|
+
msgctxt "The label for a button that opens a file manager in order to insert a file."
|
|
73
|
+
msgid "File"
|
|
74
|
+
msgstr "文件"
|
|
75
|
+
|
|
76
|
+
msgctxt "The label for the insert image with the file manager menu bar button (inside 'Insert' menu)"
|
|
77
|
+
msgid "With file manager"
|
|
78
|
+
msgstr ""
|
|
79
|
+
|
|
72
80
|
msgctxt "The button label for the object (e.g. image, table) toolbar for hiding the attached caption."
|
|
73
81
|
msgid "Toggle caption off"
|
|
74
82
|
msgstr "关闭表标题"
|
package/lang/translations/zh.po
CHANGED
|
@@ -69,6 +69,14 @@ msgctxt "The label for the replace image with the file manager toolbar button."
|
|
|
69
69
|
msgid "Replace image with file manager"
|
|
70
70
|
msgstr "使用檔案管理員替換圖片"
|
|
71
71
|
|
|
72
|
+
msgctxt "The label for a button that opens a file manager in order to insert a file."
|
|
73
|
+
msgid "File"
|
|
74
|
+
msgstr "檔案"
|
|
75
|
+
|
|
76
|
+
msgctxt "The label for the insert image with the file manager menu bar button (inside 'Insert' menu)"
|
|
77
|
+
msgid "With file manager"
|
|
78
|
+
msgstr ""
|
|
79
|
+
|
|
72
80
|
msgctxt "The button label for the object (e.g. image, table) toolbar for hiding the attached caption."
|
|
73
81
|
msgid "Toggle caption off"
|
|
74
82
|
msgstr "關閉表標題"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "42.0.0-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,8 +24,9 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "src/index.js",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ckeditor/ckeditor5-engine": "
|
|
28
|
-
"@ckeditor/ckeditor5-utils": "
|
|
27
|
+
"@ckeditor/ckeditor5-engine": "42.0.0-alpha.1",
|
|
28
|
+
"@ckeditor/ckeditor5-utils": "42.0.0-alpha.1",
|
|
29
|
+
"@ckeditor/ckeditor5-watchdog": "42.0.0-alpha.1",
|
|
29
30
|
"lodash-es": "4.17.21"
|
|
30
31
|
},
|
|
31
32
|
"author": "CKSource (http://cksource.com/)",
|
package/src/command.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const Command_base: {
|
|
|
24
24
|
* By default, commands are disabled when the editor is in the {@link module:core/editor/editor~Editor#isReadOnly read-only} mode
|
|
25
25
|
* but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.
|
|
26
26
|
*/
|
|
27
|
-
export default class Command extends Command_base {
|
|
27
|
+
export default class Command extends /* #__PURE__ */ Command_base {
|
|
28
28
|
/**
|
|
29
29
|
* The editor on which this command will be used.
|
|
30
30
|
*/
|
package/src/command.js
CHANGED
|
@@ -19,7 +19,7 @@ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
|
19
19
|
* By default, commands are disabled when the editor is in the {@link module:core/editor/editor~Editor#isReadOnly read-only} mode
|
|
20
20
|
* but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.
|
|
21
21
|
*/
|
|
22
|
-
export default class Command extends ObservableMixin() {
|
|
22
|
+
export default class Command extends /* #__PURE__ */ ObservableMixin() {
|
|
23
23
|
/**
|
|
24
24
|
* Creates a new `Command` instance.
|
|
25
25
|
*
|
package/src/contextplugin.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const ContextPlugin_base: {
|
|
|
29
29
|
* * An {@link module:core/plugin~Plugin editor plugin} can require a context plugin.
|
|
30
30
|
* * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.
|
|
31
31
|
*/
|
|
32
|
-
export default class ContextPlugin extends ContextPlugin_base implements PluginInterface {
|
|
32
|
+
export default class ContextPlugin extends /* #__PURE__ */ ContextPlugin_base implements PluginInterface {
|
|
33
33
|
/**
|
|
34
34
|
* The context or editor instance.
|
|
35
35
|
*/
|
package/src/contextplugin.js
CHANGED
|
@@ -20,7 +20,7 @@ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
|
20
20
|
* * An {@link module:core/plugin~Plugin editor plugin} can require a context plugin.
|
|
21
21
|
* * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.
|
|
22
22
|
*/
|
|
23
|
-
export default class ContextPlugin extends ObservableMixin() {
|
|
23
|
+
export default class ContextPlugin extends /* #__PURE__ */ ObservableMixin() {
|
|
24
24
|
/**
|
|
25
25
|
* Creates a new plugin instance.
|
|
26
26
|
*/
|
package/src/editor/editor.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { Config, type Locale, type LocaleTranslate } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import { Conversion, DataController, EditingController, Model } from '@ckeditor/ckeditor5-engine';
|
|
10
10
|
import type { EditorUI } from '@ckeditor/ckeditor5-ui';
|
|
11
|
+
import { ContextWatchdog, EditorWatchdog } from '@ckeditor/ckeditor5-watchdog';
|
|
11
12
|
import Context from '../context.js';
|
|
12
13
|
import PluginCollection from '../plugincollection.js';
|
|
13
14
|
import CommandCollection, { type CommandsMap } from '../commandcollection.js';
|
|
@@ -37,7 +38,7 @@ declare const Editor_base: {
|
|
|
37
38
|
* the specific editor implements also the {@link ~Editor#ui} property
|
|
38
39
|
* (as most editor implementations do).
|
|
39
40
|
*/
|
|
40
|
-
export default abstract class Editor extends Editor_base {
|
|
41
|
+
export default abstract class Editor extends /* #__PURE__ */ Editor_base {
|
|
41
42
|
/**
|
|
42
43
|
* A namespace for the accessibility features of the editor.
|
|
43
44
|
*/
|
|
@@ -428,6 +429,24 @@ export default abstract class Editor extends Editor_base {
|
|
|
428
429
|
* * {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`}
|
|
429
430
|
*/
|
|
430
431
|
static create(...args: Array<unknown>): void;
|
|
432
|
+
/**
|
|
433
|
+
* The {@link module:core/context~Context} class.
|
|
434
|
+
*
|
|
435
|
+
* Exposed as static editor field for easier access in editor builds.
|
|
436
|
+
*/
|
|
437
|
+
static Context: typeof Context;
|
|
438
|
+
/**
|
|
439
|
+
* The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
|
|
440
|
+
*
|
|
441
|
+
* Exposed as static editor field for easier access in editor builds.
|
|
442
|
+
*/
|
|
443
|
+
static EditorWatchdog: typeof EditorWatchdog;
|
|
444
|
+
/**
|
|
445
|
+
* The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
|
|
446
|
+
*
|
|
447
|
+
* Exposed as static editor field for easier access in editor builds.
|
|
448
|
+
*/
|
|
449
|
+
static ContextWatchdog: typeof ContextWatchdog;
|
|
431
450
|
}
|
|
432
451
|
/**
|
|
433
452
|
* Fired when the {@link module:engine/controller/datacontroller~DataController#event:ready data} and all additional
|
|
@@ -464,7 +483,7 @@ export {};
|
|
|
464
483
|
* This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.
|
|
465
484
|
*
|
|
466
485
|
* The only editor type which can be initialized on `<textarea>` elements is
|
|
467
|
-
* the {@glink
|
|
486
|
+
* the {@glink getting-started/legacy/installation-methods/predefined-builds#classic-editor classic editor}.
|
|
468
487
|
* This editor hides the passed element and inserts its own UI next to it. Other types of editors reuse the passed element as their root
|
|
469
488
|
* editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:
|
|
470
489
|
*
|
package/src/editor/editor.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Config, CKEditorError, ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import { Conversion, DataController, EditingController, Model, StylesProcessor } from '@ckeditor/ckeditor5-engine';
|
|
10
|
+
import { ContextWatchdog, EditorWatchdog } from '@ckeditor/ckeditor5-watchdog';
|
|
10
11
|
import Context from '../context.js';
|
|
11
12
|
import PluginCollection from '../plugincollection.js';
|
|
12
13
|
import CommandCollection from '../commandcollection.js';
|
|
@@ -30,7 +31,7 @@ import Accessibility from '../accessibility.js';
|
|
|
30
31
|
* the specific editor implements also the {@link ~Editor#ui} property
|
|
31
32
|
* (as most editor implementations do).
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
+
class Editor extends /* #__PURE__ */ ObservableMixin() {
|
|
34
35
|
/**
|
|
35
36
|
* Creates a new instance of the editor class.
|
|
36
37
|
*
|
|
@@ -360,11 +361,30 @@ export default class Editor extends ObservableMixin() {
|
|
|
360
361
|
throw new Error('This is an abstract method.');
|
|
361
362
|
}
|
|
362
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* The {@link module:core/context~Context} class.
|
|
366
|
+
*
|
|
367
|
+
* Exposed as static editor field for easier access in editor builds.
|
|
368
|
+
*/
|
|
369
|
+
Editor.Context = Context;
|
|
370
|
+
/**
|
|
371
|
+
* The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
|
|
372
|
+
*
|
|
373
|
+
* Exposed as static editor field for easier access in editor builds.
|
|
374
|
+
*/
|
|
375
|
+
Editor.EditorWatchdog = EditorWatchdog;
|
|
376
|
+
/**
|
|
377
|
+
* The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
|
|
378
|
+
*
|
|
379
|
+
* Exposed as static editor field for easier access in editor builds.
|
|
380
|
+
*/
|
|
381
|
+
Editor.ContextWatchdog = ContextWatchdog;
|
|
382
|
+
export default Editor;
|
|
363
383
|
/**
|
|
364
384
|
* This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.
|
|
365
385
|
*
|
|
366
386
|
* The only editor type which can be initialized on `<textarea>` elements is
|
|
367
|
-
* the {@glink
|
|
387
|
+
* the {@glink getting-started/legacy/installation-methods/predefined-builds#classic-editor classic editor}.
|
|
368
388
|
* This editor hides the passed element and inserts its own UI next to it. Other types of editors reuse the passed element as their root
|
|
369
389
|
* editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:
|
|
370
390
|
*
|
|
@@ -28,15 +28,12 @@ import type { MenuBarConfig } from '@ckeditor/ckeditor5-ui';
|
|
|
28
28
|
* .then( ... )
|
|
29
29
|
* .catch( ... );
|
|
30
30
|
* ```
|
|
31
|
-
*
|
|
32
|
-
* Check the {@glink installation/getting-started/predefined-builds Configuration} guide for more information
|
|
33
|
-
* about setting configuration options.
|
|
34
31
|
*/
|
|
35
32
|
export interface EditorConfig {
|
|
36
33
|
context?: Context;
|
|
37
34
|
/**
|
|
38
35
|
* The list of additional plugins to load along those already available in the
|
|
39
|
-
*
|
|
36
|
+
* editor. It extends the {@link #plugins `plugins`} configuration.
|
|
40
37
|
*
|
|
41
38
|
* ```ts
|
|
42
39
|
* function MyPlugin( editor ) {
|
|
@@ -51,10 +48,10 @@ export interface EditorConfig {
|
|
|
51
48
|
* **Note:** This configuration works only for simple plugins which utilize the
|
|
52
49
|
* {@link module:core/plugin~PluginInterface plugin interface} and have no dependencies. To extend a
|
|
53
50
|
* build with complex features, create a
|
|
54
|
-
* {@glink
|
|
51
|
+
* {@glink getting-started/legacy/installation-methods/quick-start-other#creating-custom-builds-with-online-builder custom build}.
|
|
55
52
|
*
|
|
56
53
|
* **Note:** Make sure you include the new features in you toolbar configuration. Learn more
|
|
57
|
-
* about the {@glink
|
|
54
|
+
* about the {@glink getting-started/setup/toolbar toolbar setup}.
|
|
58
55
|
*/
|
|
59
56
|
extraPlugins?: Array<PluginConstructor<Editor>>;
|
|
60
57
|
/**
|
|
@@ -112,10 +109,6 @@ export interface EditorConfig {
|
|
|
112
109
|
/**
|
|
113
110
|
* The language of the editor UI and its content.
|
|
114
111
|
*
|
|
115
|
-
* Note: You do not have to specify this option if your build is optimized for one UI language or if it is
|
|
116
|
-
* the default language (English is the default language for CDN builds), unless you want to change
|
|
117
|
-
* the language of your content.
|
|
118
|
-
*
|
|
119
112
|
* Simple usage (change the language of the UI and the content):
|
|
120
113
|
*
|
|
121
114
|
* ```ts
|
|
@@ -161,16 +154,56 @@ export interface EditorConfig {
|
|
|
161
154
|
* The language codes are defined in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) standard.
|
|
162
155
|
*
|
|
163
156
|
* You need to add the corresponding translation file for the new UI language to work.
|
|
164
|
-
* Translation files are available on CDN
|
|
157
|
+
* Translation files are available on CDN:
|
|
165
158
|
*
|
|
166
159
|
* ```html
|
|
167
|
-
*
|
|
160
|
+
* <script type="importmap">
|
|
161
|
+
* {
|
|
162
|
+
* "imports": {
|
|
163
|
+
* "ckeditor5": "https://cdn.ckeditor.com/ckeditor5/<VERSION>/ckeditor5.js",
|
|
164
|
+
* "ckeditor5/": "https://cdn.ckeditor.com/ckeditor5/<VERSION>/"
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* </script>
|
|
168
|
+
* <script type="module">
|
|
169
|
+
* import { ClassicEditor, Essentials, Paragraph } from 'ckeditor5';
|
|
170
|
+
* import translations from 'ckeditor5/dist/translations/pl.js';
|
|
171
|
+
*
|
|
172
|
+
* await ClassicEditor.create( document.querySelector( '#editor' ), {
|
|
173
|
+
* plugins: [
|
|
174
|
+
* Essentials,
|
|
175
|
+
* Paragraph,
|
|
176
|
+
* ],
|
|
177
|
+
* toolbar: {
|
|
178
|
+
* items: [ 'undo', 'redo' ]
|
|
179
|
+
* },
|
|
180
|
+
* translations
|
|
181
|
+
* } );
|
|
182
|
+
* </script>
|
|
168
183
|
* ```
|
|
169
184
|
*
|
|
170
|
-
*
|
|
185
|
+
* You can add translation using NPM as well.
|
|
171
186
|
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
187
|
+
* ```html
|
|
188
|
+
* import { ClassicEditor, Essentials, Paragraph } from 'ckeditor5';
|
|
189
|
+
* import translations from 'ckeditor5/dist/translations/pl.js';
|
|
190
|
+
*
|
|
191
|
+
* import 'ckeditor5/dist/styles.css';
|
|
192
|
+
*
|
|
193
|
+
* await ClassicEditor.create( document.querySelector( '#editor' ), {
|
|
194
|
+
* plugins: [
|
|
195
|
+
* Essentials,
|
|
196
|
+
* Paragraph,
|
|
197
|
+
* ],
|
|
198
|
+
* toolbar: {
|
|
199
|
+
* items: [ 'undo', 'redo' ]
|
|
200
|
+
* },
|
|
201
|
+
* translations
|
|
202
|
+
* } );
|
|
203
|
+
* ```
|
|
204
|
+
*
|
|
205
|
+
* Check the {@glink getting-started/setup/ui-language UI language} guide for more information about
|
|
206
|
+
* the localization options and translation process.
|
|
174
207
|
*/
|
|
175
208
|
language?: string | LanguageConfig;
|
|
176
209
|
/**
|
|
@@ -501,30 +534,13 @@ export interface EditorConfig {
|
|
|
501
534
|
/**
|
|
502
535
|
* The list of plugins to load.
|
|
503
536
|
*
|
|
504
|
-
* If you use an {@glink installation/getting-started/predefined-builds editor build} you can define the list of plugins to load
|
|
505
|
-
* using the names of plugins that are available:
|
|
506
|
-
*
|
|
507
|
-
* ```ts
|
|
508
|
-
* const config = {
|
|
509
|
-
* plugins: [ 'Bold', 'Italic', 'Typing', 'Enter', ... ]
|
|
510
|
-
* };
|
|
511
|
-
* ```
|
|
512
|
-
*
|
|
513
|
-
* You can check the list of plugins available in a build using this snippet:
|
|
514
|
-
*
|
|
515
|
-
* ```ts
|
|
516
|
-
* ClassicEditor.builtinPlugins.map( plugin => plugin.pluginName );
|
|
517
|
-
* ```
|
|
518
|
-
*
|
|
519
|
-
* If you use an editor creator directly (imported from a package like `@ckeditor/ckeditor5-editor-classic`) or you
|
|
520
|
-
* want to load additional plugins which were not included in a build you use, then you need to specify
|
|
521
|
-
* the plugins using their constructors:
|
|
522
|
-
*
|
|
523
537
|
* ```ts
|
|
538
|
+
* import {
|
|
524
539
|
* // A preset of plugins is a plugin as well.
|
|
525
|
-
*
|
|
540
|
+
* Essentials,
|
|
526
541
|
* // The bold plugin.
|
|
527
|
-
*
|
|
542
|
+
* Bold
|
|
543
|
+
* } from 'ckeditor5';
|
|
528
544
|
*
|
|
529
545
|
* const config = {
|
|
530
546
|
* plugins: [ Essentials, Bold ]
|
|
@@ -536,8 +552,8 @@ export interface EditorConfig {
|
|
|
536
552
|
*/
|
|
537
553
|
plugins?: Array<PluginConstructor<Editor> | string>;
|
|
538
554
|
/**
|
|
539
|
-
* The list of plugins which should not be loaded despite being available in
|
|
540
|
-
* editor
|
|
555
|
+
* The list of plugins which should not be loaded despite being available in
|
|
556
|
+
* the editor.
|
|
541
557
|
*
|
|
542
558
|
* ```ts
|
|
543
559
|
* const config = {
|
|
@@ -545,7 +561,7 @@ export interface EditorConfig {
|
|
|
545
561
|
* };
|
|
546
562
|
* ```
|
|
547
563
|
*
|
|
548
|
-
* **Note:** Be careful when removing plugins using `config.removePlugins
|
|
564
|
+
* **Note:** Be careful when removing plugins using `config.removePlugins`.
|
|
549
565
|
* If removed plugins were providing toolbar buttons, the default toolbar configuration included in a build
|
|
550
566
|
* will become invalid. In such case you need to provide the updated
|
|
551
567
|
* {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.
|
package/src/pendingactions.d.ts
CHANGED
|
@@ -49,7 +49,8 @@ import { type CollectionAddEvent, type CollectionRemoveEvent, type Observable }
|
|
|
49
49
|
*
|
|
50
50
|
* This plugin is used by features like {@link module:upload/filerepository~FileRepository} to register their ongoing actions
|
|
51
51
|
* and by features like {@link module:autosave/autosave~Autosave} to detect whether there are any ongoing actions.
|
|
52
|
-
* Read more about saving the data in the
|
|
52
|
+
* Read more about saving the data in the
|
|
53
|
+
* {@glink getting-started/setup/getting-and-setting-data Saving and getting data} guide.
|
|
53
54
|
*/
|
|
54
55
|
export default class PendingActions extends ContextPlugin implements Iterable<PendingAction> {
|
|
55
56
|
/**
|
package/src/pendingactions.js
CHANGED
|
@@ -49,7 +49,8 @@ import { CKEditorError, Collection, ObservableMixin } from '@ckeditor/ckeditor5-
|
|
|
49
49
|
*
|
|
50
50
|
* This plugin is used by features like {@link module:upload/filerepository~FileRepository} to register their ongoing actions
|
|
51
51
|
* and by features like {@link module:autosave/autosave~Autosave} to detect whether there are any ongoing actions.
|
|
52
|
-
* Read more about saving the data in the
|
|
52
|
+
* Read more about saving the data in the
|
|
53
|
+
* {@glink getting-started/setup/getting-and-setting-data Saving and getting data} guide.
|
|
53
54
|
*/
|
|
54
55
|
export default class PendingActions extends ContextPlugin {
|
|
55
56
|
/**
|
package/src/plugin.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare const Plugin_base: {
|
|
|
10
10
|
/**
|
|
11
11
|
* The base class for CKEditor plugin classes.
|
|
12
12
|
*/
|
|
13
|
-
export default class Plugin extends Plugin_base implements PluginInterface {
|
|
13
|
+
export default class Plugin extends /* #__PURE__ */ Plugin_base implements PluginInterface {
|
|
14
14
|
/**
|
|
15
15
|
* The editor instance.
|
|
16
16
|
*
|
package/src/plugin.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
|
10
10
|
/**
|
|
11
11
|
* The base class for CKEditor plugin classes.
|
|
12
12
|
*/
|
|
13
|
-
export default class Plugin extends ObservableMixin() {
|
|
13
|
+
export default class Plugin extends /* #__PURE__ */ ObservableMixin() {
|
|
14
14
|
/**
|
|
15
15
|
* @inheritDoc
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ declare const PluginCollection_base: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
|
|
12
12
|
*/
|
|
13
|
-
export default class PluginCollection<TContext extends object> extends PluginCollection_base implements Iterable<PluginEntry<TContext>> {
|
|
13
|
+
export default class PluginCollection<TContext extends object> extends /* #__PURE__ */ PluginCollection_base implements Iterable<PluginEntry<TContext>> {
|
|
14
14
|
private _context;
|
|
15
15
|
private _plugins;
|
|
16
16
|
/**
|
package/src/plugincollection.js
CHANGED
|
@@ -9,7 +9,7 @@ import { CKEditorError, EmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
|
9
9
|
/**
|
|
10
10
|
* Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
|
|
11
11
|
*/
|
|
12
|
-
export default class PluginCollection extends EmitterMixin() {
|
|
12
|
+
export default class PluginCollection extends /* #__PURE__ */ EmitterMixin() {
|
|
13
13
|
/**
|
|
14
14
|
* Creates an instance of the plugin collection class.
|
|
15
15
|
* Allows loading and initializing plugins and their dependencies.
|
|
@@ -85,8 +85,6 @@ export default class PluginCollection extends EmitterMixin() {
|
|
|
85
85
|
*
|
|
86
86
|
* Plugin classes (constructors) need to be provided to the editor and must be loaded before they can be obtained from
|
|
87
87
|
* the plugin collection.
|
|
88
|
-
* This is usually done in CKEditor 5 builds by setting the {@link module:core/editor/editor~Editor.builtinPlugins}
|
|
89
|
-
* property.
|
|
90
88
|
*
|
|
91
89
|
* **Note**: You can use `{@link module:core/plugincollection~PluginCollection#has editor.plugins.has()}`
|
|
92
90
|
* to check if a plugin was loaded.
|
|
@@ -270,17 +268,18 @@ export default class PluginCollection extends EmitterMixin() {
|
|
|
270
268
|
* This is usually done in CKEditor 5 builds by setting the {@link module:core/editor/editor~Editor.builtinPlugins}
|
|
271
269
|
* property.
|
|
272
270
|
*
|
|
273
|
-
* **If you see this warning when using one of the
|
|
274
|
-
* CKEditor 5 Builds}**,
|
|
271
|
+
* **If you see this warning when using one of the CKEditor 5 Builds},
|
|
275
272
|
* it means that you try to enable a plugin which was not included in that build. This may be due to a typo
|
|
276
|
-
* in the plugin name or simply because that plugin is not a part of this build.
|
|
277
|
-
*
|
|
273
|
+
* in the plugin name or simply because that plugin is not a part of this build.
|
|
274
|
+
*
|
|
275
|
+
* Predefined builds are a deprecated solution and we strongly advise
|
|
276
|
+
* {@glink updating/new-installation-methods migrating to new installation methods}.
|
|
278
277
|
*
|
|
279
278
|
* **If you see this warning when using one of the editor creators directly** (not a build), then it means
|
|
280
279
|
* that you tried loading plugins by name. However, unlike CKEditor 4, CKEditor 5 does not implement a "plugin loader".
|
|
281
280
|
* This means that CKEditor 5 does not know where to load the plugin modules from. Therefore, you need to
|
|
282
281
|
* provide each plugin through a reference (as a constructor function). Check out the examples in
|
|
283
|
-
* {@glink
|
|
282
|
+
* {@glink getting-started/legacy/advanced/alternative-setups/integrating-from-source-webpack "Building from source"}.
|
|
284
283
|
*
|
|
285
284
|
* @error plugincollection-plugin-not-found
|
|
286
285
|
* @param plugin The name of the plugin which could not be loaded.
|
|
@@ -448,6 +447,9 @@ export default class PluginCollection extends EmitterMixin() {
|
|
|
448
447
|
* {@link module:core/editor/editor~Editor.create `Editor.create()`}
|
|
449
448
|
* or specified in {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.
|
|
450
449
|
*
|
|
450
|
+
* Predefined builds are a deprecated solution and we strongly advise
|
|
451
|
+
* {@glink updating/new-installation-methods migrating to new installation methods}.
|
|
452
|
+
*
|
|
451
453
|
* The second option is that your `node_modules/` directory contains duplicated versions of the same
|
|
452
454
|
* CKEditor 5 packages. Normally, on clean installations, npm deduplicates packages in `node_modules/`, so
|
|
453
455
|
* it may be enough to call `rm -rf node_modules && npm i`. However, if you installed conflicting versions
|
|
@@ -459,8 +461,6 @@ export default class PluginCollection extends EmitterMixin() {
|
|
|
459
461
|
* They are already built into that editor build and now get added for the second time as dependencies
|
|
460
462
|
* of the plugin you are installing.
|
|
461
463
|
*
|
|
462
|
-
* Read more about {@glink installation/plugins/installing-plugins Installing plugins}.
|
|
463
|
-
*
|
|
464
464
|
* @error plugincollection-plugin-name-conflict
|
|
465
465
|
* @param pluginName The duplicated plugin name.
|
|
466
466
|
* @param plugin1 The first plugin constructor.
|