@ckeditor/ckeditor5-core 0.0.0-internal-20241017.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/CHANGELOG.md +4 -0
- package/LICENSE.md +21 -0
- package/README.md +24 -0
- package/dist/accessibility.d.ts +365 -0
- package/dist/augmentation.d.ts +14 -0
- package/dist/command.d.ts +193 -0
- package/dist/commandcollection.d.ts +87 -0
- package/dist/context.d.ts +241 -0
- package/dist/contextplugin.d.ts +73 -0
- package/dist/editingkeystrokehandler.d.ts +60 -0
- package/dist/editor/editor.d.ts +524 -0
- package/dist/editor/editorconfig.d.ts +992 -0
- package/dist/editor/utils/attachtoform.d.ts +19 -0
- package/dist/editor/utils/dataapimixin.d.ts +83 -0
- package/dist/editor/utils/editorusagedata.d.ts +62 -0
- package/dist/editor/utils/elementapimixin.d.ts +39 -0
- package/dist/editor/utils/securesourceelement.d.ts +21 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +3027 -0
- package/dist/index.js.map +1 -0
- package/dist/multicommand.d.ts +70 -0
- package/dist/pendingactions.d.ts +126 -0
- package/dist/plugin.d.ts +294 -0
- package/dist/plugincollection.d.ts +121 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +5 -0
- package/dist/translations/af.umd.js +11 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es-co.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/gu.d.ts +8 -0
- package/dist/translations/gu.js +5 -0
- package/dist/translations/gu.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/hy.d.ts +8 -0
- package/dist/translations/hy.js +5 -0
- package/dist/translations/hy.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/oc.d.ts +8 -0
- package/dist/translations/oc.js +5 -0
- package/dist/translations/oc.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/si.d.ts +8 -0
- package/dist/translations/si.js +5 -0
- package/dist/translations/si.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sl.d.ts +8 -0
- package/dist/translations/sl.js +5 -0
- package/dist/translations/sl.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/typings.d.ts +16 -0
- package/lang/contexts.json +31 -0
- package/lang/translations/af.po +134 -0
- package/lang/translations/ar.po +134 -0
- package/lang/translations/ast.po +134 -0
- package/lang/translations/az.po +134 -0
- package/lang/translations/bg.po +134 -0
- package/lang/translations/bn.po +134 -0
- package/lang/translations/bs.po +134 -0
- package/lang/translations/ca.po +134 -0
- package/lang/translations/cs.po +134 -0
- package/lang/translations/da.po +134 -0
- package/lang/translations/de-ch.po +134 -0
- package/lang/translations/de.po +134 -0
- package/lang/translations/el.po +134 -0
- package/lang/translations/en-au.po +134 -0
- package/lang/translations/en-gb.po +134 -0
- package/lang/translations/en.po +134 -0
- package/lang/translations/eo.po +134 -0
- package/lang/translations/es-co.po +134 -0
- package/lang/translations/es.po +134 -0
- package/lang/translations/et.po +134 -0
- package/lang/translations/eu.po +134 -0
- package/lang/translations/fa.po +134 -0
- package/lang/translations/fi.po +134 -0
- package/lang/translations/fr.po +134 -0
- package/lang/translations/gl.po +134 -0
- package/lang/translations/gu.po +134 -0
- package/lang/translations/he.po +134 -0
- package/lang/translations/hi.po +134 -0
- package/lang/translations/hr.po +134 -0
- package/lang/translations/hu.po +134 -0
- package/lang/translations/hy.po +134 -0
- package/lang/translations/id.po +134 -0
- package/lang/translations/it.po +134 -0
- package/lang/translations/ja.po +134 -0
- package/lang/translations/jv.po +134 -0
- package/lang/translations/km.po +134 -0
- package/lang/translations/kn.po +134 -0
- package/lang/translations/ko.po +134 -0
- package/lang/translations/ku.po +134 -0
- package/lang/translations/lt.po +134 -0
- package/lang/translations/lv.po +134 -0
- package/lang/translations/ms.po +134 -0
- package/lang/translations/nb.po +134 -0
- package/lang/translations/ne.po +134 -0
- package/lang/translations/nl.po +134 -0
- package/lang/translations/no.po +134 -0
- package/lang/translations/oc.po +134 -0
- package/lang/translations/pl.po +134 -0
- package/lang/translations/pt-br.po +134 -0
- package/lang/translations/pt.po +134 -0
- package/lang/translations/ro.po +134 -0
- package/lang/translations/ru.po +134 -0
- package/lang/translations/si.po +134 -0
- package/lang/translations/sk.po +134 -0
- package/lang/translations/sl.po +134 -0
- package/lang/translations/sq.po +134 -0
- package/lang/translations/sr-latn.po +134 -0
- package/lang/translations/sr.po +134 -0
- package/lang/translations/sv.po +134 -0
- package/lang/translations/th.po +134 -0
- package/lang/translations/ti.po +134 -0
- package/lang/translations/tk.po +134 -0
- package/lang/translations/tr.po +134 -0
- package/lang/translations/tt.po +134 -0
- package/lang/translations/ug.po +134 -0
- package/lang/translations/uk.po +134 -0
- package/lang/translations/ur.po +134 -0
- package/lang/translations/uz.po +134 -0
- package/lang/translations/vi.po +134 -0
- package/lang/translations/zh-cn.po +134 -0
- package/lang/translations/zh.po +134 -0
- package/package.json +51 -0
- package/src/accessibility.d.ts +361 -0
- package/src/accessibility.js +325 -0
- package/src/augmentation.d.ts +10 -0
- package/src/augmentation.js +5 -0
- package/src/command.d.ts +189 -0
- package/src/command.js +185 -0
- package/src/commandcollection.d.ts +83 -0
- package/src/commandcollection.js +83 -0
- package/src/context.d.ts +237 -0
- package/src/context.js +229 -0
- package/src/contextplugin.d.ts +69 -0
- package/src/contextplugin.js +55 -0
- package/src/editingkeystrokehandler.d.ts +56 -0
- package/src/editingkeystrokehandler.js +57 -0
- package/src/editor/editor.d.ts +520 -0
- package/src/editor/editor.js +701 -0
- package/src/editor/editorconfig.d.ts +988 -0
- package/src/editor/editorconfig.js +5 -0
- package/src/editor/utils/attachtoform.d.ts +15 -0
- package/src/editor/utils/attachtoform.js +57 -0
- package/src/editor/utils/dataapimixin.d.ts +79 -0
- package/src/editor/utils/dataapimixin.js +12 -0
- package/src/editor/utils/editorusagedata.d.ts +58 -0
- package/src/editor/utils/editorusagedata.js +120 -0
- package/src/editor/utils/elementapimixin.d.ts +35 -0
- package/src/editor/utils/elementapimixin.js +43 -0
- package/src/editor/utils/securesourceelement.d.ts +17 -0
- package/src/editor/utils/securesourceelement.js +35 -0
- package/src/index.d.ts +90 -0
- package/src/index.js +147 -0
- package/src/multicommand.d.ts +66 -0
- package/src/multicommand.js +82 -0
- package/src/pendingactions.d.ts +122 -0
- package/src/pendingactions.js +123 -0
- package/src/plugin.d.ts +290 -0
- package/src/plugin.js +118 -0
- package/src/plugincollection.d.ts +117 -0
- package/src/plugincollection.js +473 -0
- package/src/typings.d.ts +12 -0
- package/src/typings.js +5 -0
- package/theme/icons/align-bottom.svg +1 -0
- package/theme/icons/align-center.svg +1 -0
- package/theme/icons/align-justify.svg +1 -0
- package/theme/icons/align-left.svg +1 -0
- package/theme/icons/align-middle.svg +1 -0
- package/theme/icons/align-right.svg +1 -0
- package/theme/icons/align-top.svg +1 -0
- package/theme/icons/bold.svg +1 -0
- package/theme/icons/browse-files.svg +1 -0
- package/theme/icons/bulletedlist.svg +1 -0
- package/theme/icons/cancel.svg +1 -0
- package/theme/icons/caption.svg +1 -0
- package/theme/icons/check.svg +1 -0
- package/theme/icons/codeblock.svg +1 -0
- package/theme/icons/cog.svg +1 -0
- package/theme/icons/color-palette.svg +1 -0
- package/theme/icons/drag-indicator.svg +1 -0
- package/theme/icons/eraser.svg +1 -0
- package/theme/icons/heading1.svg +1 -0
- package/theme/icons/heading2.svg +1 -0
- package/theme/icons/heading3.svg +1 -0
- package/theme/icons/heading4.svg +1 -0
- package/theme/icons/heading5.svg +1 -0
- package/theme/icons/heading6.svg +1 -0
- package/theme/icons/history.svg +1 -0
- package/theme/icons/horizontalline.svg +1 -0
- package/theme/icons/html.svg +1 -0
- package/theme/icons/image-asset-manager.svg +1 -0
- package/theme/icons/image-upload.svg +1 -0
- package/theme/icons/image-url.svg +1 -0
- package/theme/icons/image.svg +1 -0
- package/theme/icons/importexport.svg +1 -0
- package/theme/icons/indent.svg +1 -0
- package/theme/icons/loupe.svg +1 -0
- package/theme/icons/low-vision.svg +1 -0
- package/theme/icons/next-arrow.svg +1 -0
- package/theme/icons/numberedlist.svg +1 -0
- package/theme/icons/object-center.svg +1 -0
- package/theme/icons/object-full-width.svg +1 -0
- package/theme/icons/object-inline-left.svg +1 -0
- package/theme/icons/object-inline-right.svg +1 -0
- package/theme/icons/object-inline.svg +1 -0
- package/theme/icons/object-left.svg +1 -0
- package/theme/icons/object-right.svg +1 -0
- package/theme/icons/object-size-custom.svg +1 -0
- package/theme/icons/object-size-full.svg +1 -0
- package/theme/icons/object-size-large.svg +1 -0
- package/theme/icons/object-size-medium.svg +1 -0
- package/theme/icons/object-size-small.svg +1 -0
- package/theme/icons/outdent.svg +1 -0
- package/theme/icons/paragraph.svg +1 -0
- package/theme/icons/pencil.svg +1 -0
- package/theme/icons/pilcrow.svg +1 -0
- package/theme/icons/plus.svg +1 -0
- package/theme/icons/previous-arrow.svg +1 -0
- package/theme/icons/quote.svg +1 -0
- package/theme/icons/redo.svg +1 -0
- package/theme/icons/table.svg +1 -0
- package/theme/icons/text-alternative.svg +1 -0
- package/theme/icons/text.svg +1 -0
- package/theme/icons/three-vertical-dots.svg +1 -0
- package/theme/icons/todolist.svg +1 -0
- package/theme/icons/undo.svg +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { default as Editor } from '../editor.js';
|
|
10
|
+
import type { ElementApi } from './elementapimixin.js';
|
|
11
|
+
/**
|
|
12
|
+
* Checks if the editor is initialized on a `<textarea>` element that belongs to a form. If yes, it updates the editor's element
|
|
13
|
+
* content before submitting the form.
|
|
14
|
+
*
|
|
15
|
+
* This helper requires the {@link module:core/editor/utils/elementapimixin~ElementApi ElementApi interface}.
|
|
16
|
+
*
|
|
17
|
+
* @param editor Editor instance.
|
|
18
|
+
*/
|
|
19
|
+
export default function attachToForm(editor: Editor & ElementApi): void;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module core/editor/utils/dataapimixin
|
|
11
|
+
*/
|
|
12
|
+
import type Editor from '../editor.js';
|
|
13
|
+
import type { Constructor } from '@ckeditor/ckeditor5-utils';
|
|
14
|
+
/**
|
|
15
|
+
* Implementation of the {@link module:core/editor/utils/dataapimixin~DataApi}.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated This functionality is already implemented by the `Editor` class.
|
|
18
|
+
*/
|
|
19
|
+
export default function DataApiMixin<Base extends Constructor<Editor>>(base: Base): Base;
|
|
20
|
+
/**
|
|
21
|
+
* Interface defining editor methods for setting and getting data to and from the editor's main root element
|
|
22
|
+
* using the {@link module:core/editor/editor~Editor#data data pipeline}.
|
|
23
|
+
*
|
|
24
|
+
* This interface is not a part of the {@link module:core/editor/editor~Editor} class because one may want to implement
|
|
25
|
+
* an editor with multiple root elements, in which case the methods for setting and getting data will need to be implemented
|
|
26
|
+
* differently.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated This interface is implemented by all `Editor` instances by default.
|
|
29
|
+
*/
|
|
30
|
+
export interface DataApi {
|
|
31
|
+
/**
|
|
32
|
+
* Sets the data in the editor.
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* editor.setData( '<p>This is editor!</p>' );
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* If your editor implementation uses multiple roots, you should pass an object with keys corresponding
|
|
39
|
+
* to the editor root names and values equal to the data that should be set in each root:
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* editor.setData( {
|
|
43
|
+
* header: '<p>Content for header part.</p>',
|
|
44
|
+
* content: '<p>Content for main part.</p>',
|
|
45
|
+
* footer: '<p>Content for footer part.</p>'
|
|
46
|
+
* } );
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* By default the editor accepts HTML. This can be controlled by injecting a different data processor.
|
|
50
|
+
* See the {@glink features/markdown Markdown output} guide for more details.
|
|
51
|
+
*
|
|
52
|
+
* @param data Input data.
|
|
53
|
+
*/
|
|
54
|
+
setData(data: string | Record<string, string>): void;
|
|
55
|
+
/**
|
|
56
|
+
* Gets the data from the editor.
|
|
57
|
+
*
|
|
58
|
+
* ```ts
|
|
59
|
+
* editor.getData(); // -> '<p>This is editor!</p>'
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* If your editor implementation uses multiple roots, you should pass root name as one of the options:
|
|
63
|
+
*
|
|
64
|
+
* ```ts
|
|
65
|
+
* editor.getData( { rootName: 'header' } ); // -> '<p>Content for header part.</p>'
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* By default, the editor outputs HTML. This can be controlled by injecting a different data processor.
|
|
69
|
+
* See the {@glink features/markdown Markdown output} guide for more details.
|
|
70
|
+
*
|
|
71
|
+
* A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should
|
|
72
|
+
* be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.
|
|
73
|
+
*
|
|
74
|
+
* @param options Additional configuration for the retrieved data.
|
|
75
|
+
* Editor features may introduce more configuration options that can be set through this parameter.
|
|
76
|
+
* @param options.rootName Root name. Default to `'main'`.
|
|
77
|
+
* @param options.trim Whether returned data should be trimmed. This option is set to `'empty'` by default,
|
|
78
|
+
* which means that whenever editor content is considered empty, an empty string is returned. To turn off trimming
|
|
79
|
+
* use `'none'`. In such cases exact content will be returned (for example `'<p> </p>'` for an empty editor).
|
|
80
|
+
* @returns Output data.
|
|
81
|
+
*/
|
|
82
|
+
getData(options?: Record<string, unknown>): string;
|
|
83
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type Editor from '../editor.js';
|
|
10
|
+
export declare function getEditorUsageData(editor: Editor): EditorUsageData;
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
CKEDITOR_PAGE_SESSION_ID?: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export type EditorUsageData = {
|
|
17
|
+
sessionId: string;
|
|
18
|
+
pageSessionId: string;
|
|
19
|
+
hostname: string;
|
|
20
|
+
version: string;
|
|
21
|
+
type: `${string}Editor`;
|
|
22
|
+
plugins: Array<PluginUsageData>;
|
|
23
|
+
toolbar: {
|
|
24
|
+
main?: ToolbarUsageData;
|
|
25
|
+
block?: ToolbarUsageData;
|
|
26
|
+
balloon?: ToolbarUsageData;
|
|
27
|
+
};
|
|
28
|
+
menuBar: {
|
|
29
|
+
isVisible: boolean;
|
|
30
|
+
};
|
|
31
|
+
language: {
|
|
32
|
+
ui: string;
|
|
33
|
+
content: string;
|
|
34
|
+
};
|
|
35
|
+
distribution: {
|
|
36
|
+
channel: string;
|
|
37
|
+
};
|
|
38
|
+
env: EnvUsageData;
|
|
39
|
+
integrations: {
|
|
40
|
+
[integrationName: string]: IntegrationUsageData;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type IntegrationUsageData = {
|
|
44
|
+
version: string;
|
|
45
|
+
frameworkVersion?: string;
|
|
46
|
+
};
|
|
47
|
+
type EnvUsageData = {
|
|
48
|
+
os: 'mac' | 'windows' | 'ios' | 'android' | 'unknown';
|
|
49
|
+
browser: 'safari' | 'gecko' | 'blink' | 'unknown';
|
|
50
|
+
};
|
|
51
|
+
type ToolbarUsageData = {
|
|
52
|
+
items: Array<string>;
|
|
53
|
+
isMultiline: boolean;
|
|
54
|
+
shouldNotGroupWhenFull: boolean;
|
|
55
|
+
};
|
|
56
|
+
type PluginUsageData = {
|
|
57
|
+
name: string;
|
|
58
|
+
isPremium: boolean;
|
|
59
|
+
isOfficial: boolean;
|
|
60
|
+
isContext: boolean;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module core/editor/utils/elementapimixin
|
|
11
|
+
*/
|
|
12
|
+
import { type Constructor, type Mixed } from '@ckeditor/ckeditor5-utils';
|
|
13
|
+
import type Editor from '../editor.js';
|
|
14
|
+
/**
|
|
15
|
+
* Implementation of the {@link module:core/editor/utils/elementapimixin~ElementApi}.
|
|
16
|
+
*/
|
|
17
|
+
export default function ElementApiMixin<Base extends Constructor<Editor>>(base: Base): Mixed<Base, ElementApi>;
|
|
18
|
+
/**
|
|
19
|
+
* Interface describing an editor that replaced a DOM element (was "initialized on an element").
|
|
20
|
+
*
|
|
21
|
+
* Such an editor should provide a method to
|
|
22
|
+
* {@link module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement update the replaced element with the current data}.
|
|
23
|
+
*/
|
|
24
|
+
export interface ElementApi {
|
|
25
|
+
/**
|
|
26
|
+
* The element on which the editor has been initialized.
|
|
27
|
+
*
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
sourceElement: HTMLElement | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Updates the {@link #sourceElement editor source element}'s content with the data if the
|
|
33
|
+
* {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}
|
|
34
|
+
* configuration option is set to `true`.
|
|
35
|
+
*
|
|
36
|
+
* @param data Data that the {@link #sourceElement editor source element} should be updated with.
|
|
37
|
+
*/
|
|
38
|
+
updateSourceElement(data?: string): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { default as Editor } from '../editor.js';
|
|
10
|
+
/**
|
|
11
|
+
* Marks the source element on which the editor was initialized. This prevents other editor instances from using this element.
|
|
12
|
+
*
|
|
13
|
+
* Running multiple editor instances on the same source element causes various issues and it is
|
|
14
|
+
* crucial this helper is called as soon as the source element is known to prevent collisions.
|
|
15
|
+
*
|
|
16
|
+
* @param editor Editor instance.
|
|
17
|
+
* @param sourceElement Element to bind with the editor instance.
|
|
18
|
+
*/
|
|
19
|
+
export default function secureSourceElement(editor: Editor, sourceElement: HTMLElement & {
|
|
20
|
+
ckeditorInstance?: Editor;
|
|
21
|
+
}): void;
|
package/dist/index.css
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module core
|
|
11
|
+
*/
|
|
12
|
+
export { default as Plugin, type PluginDependencies, type PluginConstructor } from './plugin.js';
|
|
13
|
+
export { default as Command, type CommandExecuteEvent } from './command.js';
|
|
14
|
+
export { default as MultiCommand } from './multicommand.js';
|
|
15
|
+
export type { CommandsMap } from './commandcollection.js';
|
|
16
|
+
export type { PluginsMap, default as PluginCollection } from './plugincollection.js';
|
|
17
|
+
export { default as Context, type ContextConfig } from './context.js';
|
|
18
|
+
export { default as ContextPlugin, type ContextPluginDependencies } from './contextplugin.js';
|
|
19
|
+
export { type EditingKeystrokeCallback } from './editingkeystrokehandler.js';
|
|
20
|
+
export type { PartialBy, NonEmptyArray, HexColor } from './typings.js';
|
|
21
|
+
export { default as Editor, type EditorReadyEvent, type EditorDestroyEvent } from './editor/editor.js';
|
|
22
|
+
export type { EditorConfig, LanguageConfig, ToolbarConfig, ToolbarConfigItem, UiConfig } from './editor/editorconfig.js';
|
|
23
|
+
export { default as attachToForm } from './editor/utils/attachtoform.js';
|
|
24
|
+
export { default as DataApiMixin, type DataApi } from './editor/utils/dataapimixin.js';
|
|
25
|
+
export { default as ElementApiMixin, type ElementApi } from './editor/utils/elementapimixin.js';
|
|
26
|
+
export { default as secureSourceElement } from './editor/utils/securesourceelement.js';
|
|
27
|
+
export { default as PendingActions, type PendingAction } from './pendingactions.js';
|
|
28
|
+
export type { KeystrokeInfos as KeystrokeInfoDefinitions, KeystrokeInfoGroup as KeystrokeInfoGroupDefinition, KeystrokeInfoCategory as KeystrokeInfoCategoryDefinition, KeystrokeInfoDefinition as KeystrokeInfoDefinition } from './accessibility.js';
|
|
29
|
+
export declare const icons: {
|
|
30
|
+
bold: string;
|
|
31
|
+
cancel: string;
|
|
32
|
+
caption: string;
|
|
33
|
+
check: string;
|
|
34
|
+
cog: string;
|
|
35
|
+
colorPalette: string;
|
|
36
|
+
eraser: string;
|
|
37
|
+
history: string;
|
|
38
|
+
image: string;
|
|
39
|
+
imageUpload: string;
|
|
40
|
+
imageAssetManager: string;
|
|
41
|
+
imageUrl: string;
|
|
42
|
+
lowVision: string;
|
|
43
|
+
textAlternative: string;
|
|
44
|
+
loupe: string;
|
|
45
|
+
previousArrow: string;
|
|
46
|
+
nextArrow: string;
|
|
47
|
+
importExport: string;
|
|
48
|
+
paragraph: string;
|
|
49
|
+
plus: string;
|
|
50
|
+
text: string;
|
|
51
|
+
alignBottom: string;
|
|
52
|
+
alignMiddle: string;
|
|
53
|
+
alignTop: string;
|
|
54
|
+
alignLeft: string;
|
|
55
|
+
alignCenter: string;
|
|
56
|
+
alignRight: string;
|
|
57
|
+
alignJustify: string;
|
|
58
|
+
objectLeft: string;
|
|
59
|
+
objectCenter: string;
|
|
60
|
+
objectRight: string;
|
|
61
|
+
objectFullWidth: string;
|
|
62
|
+
objectInline: string;
|
|
63
|
+
objectBlockLeft: string;
|
|
64
|
+
objectBlockRight: string;
|
|
65
|
+
objectSizeCustom: string;
|
|
66
|
+
objectSizeFull: string;
|
|
67
|
+
objectSizeLarge: string;
|
|
68
|
+
objectSizeSmall: string;
|
|
69
|
+
objectSizeMedium: string;
|
|
70
|
+
pencil: string;
|
|
71
|
+
pilcrow: string;
|
|
72
|
+
quote: string;
|
|
73
|
+
threeVerticalDots: string;
|
|
74
|
+
dragIndicator: string;
|
|
75
|
+
redo: string;
|
|
76
|
+
undo: string;
|
|
77
|
+
bulletedList: string;
|
|
78
|
+
numberedList: string;
|
|
79
|
+
todoList: string;
|
|
80
|
+
codeBlock: string;
|
|
81
|
+
browseFiles: string;
|
|
82
|
+
heading1: string;
|
|
83
|
+
heading2: string;
|
|
84
|
+
heading3: string;
|
|
85
|
+
heading4: string;
|
|
86
|
+
heading5: string;
|
|
87
|
+
heading6: string;
|
|
88
|
+
horizontalLine: string;
|
|
89
|
+
html: string;
|
|
90
|
+
indent: string;
|
|
91
|
+
outdent: string;
|
|
92
|
+
table: string;
|
|
93
|
+
};
|
|
94
|
+
import './augmentation.js';
|