@ckeditor/ckeditor5-core 34.2.0 → 35.0.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 +311 -0
- package/LICENSE.md +4 -0
- package/lang/contexts.json +2 -1
- package/lang/translations/af.po +4 -0
- package/lang/translations/ar.po +8 -4
- package/lang/translations/ast.po +4 -0
- package/lang/translations/az.po +4 -0
- package/lang/translations/bg.po +9 -5
- package/lang/translations/bn.po +49 -0
- package/lang/translations/bs.po +4 -0
- package/lang/translations/ca.po +8 -4
- package/lang/translations/cs.po +4 -0
- package/lang/translations/da.po +4 -0
- package/lang/translations/de-ch.po +4 -0
- package/lang/translations/de.po +4 -0
- package/lang/translations/el.po +4 -0
- package/lang/translations/en-au.po +4 -0
- package/lang/translations/en-gb.po +4 -0
- package/lang/translations/en.po +4 -0
- package/lang/translations/eo.po +4 -0
- package/lang/translations/es.po +4 -0
- package/lang/translations/et.po +5 -1
- package/lang/translations/eu.po +4 -0
- package/lang/translations/fa.po +4 -0
- package/lang/translations/fi.po +6 -2
- package/lang/translations/fr.po +5 -1
- package/lang/translations/gl.po +4 -0
- package/lang/translations/gu.po +4 -0
- package/lang/translations/he.po +7 -3
- package/lang/translations/hi.po +5 -1
- package/lang/translations/hr.po +4 -0
- package/lang/translations/hu.po +4 -0
- package/lang/translations/id.po +6 -2
- package/lang/translations/it.po +4 -0
- package/lang/translations/ja.po +7 -3
- package/lang/translations/jv.po +4 -0
- package/lang/translations/km.po +4 -0
- package/lang/translations/kn.po +4 -0
- package/lang/translations/ko.po +5 -1
- package/lang/translations/ku.po +4 -0
- package/lang/translations/lt.po +7 -3
- package/lang/translations/lv.po +4 -0
- package/lang/translations/ms.po +10 -6
- package/lang/translations/nb.po +4 -0
- package/lang/translations/ne.po +4 -0
- package/lang/translations/nl.po +4 -0
- package/lang/translations/no.po +4 -0
- package/lang/translations/oc.po +4 -0
- package/lang/translations/pl.po +4 -0
- package/lang/translations/pt-br.po +4 -0
- package/lang/translations/pt.po +8 -4
- package/lang/translations/ro.po +4 -0
- package/lang/translations/ru.po +4 -0
- package/lang/translations/si.po +4 -0
- package/lang/translations/sk.po +4 -0
- package/lang/translations/sl.po +4 -0
- package/lang/translations/sq.po +4 -0
- package/lang/translations/sr-latn.po +4 -0
- package/lang/translations/sr.po +4 -0
- package/lang/translations/sv.po +8 -4
- package/lang/translations/th.po +7 -3
- package/lang/translations/tk.po +4 -0
- package/lang/translations/tr.po +5 -1
- package/lang/translations/tt.po +4 -0
- package/lang/translations/ug.po +4 -0
- package/lang/translations/uk.po +5 -1
- package/lang/translations/ur.po +4 -0
- package/lang/translations/uz.po +4 -0
- package/lang/translations/vi.po +5 -1
- package/lang/translations/zh-cn.po +4 -0
- package/lang/translations/zh.po +4 -0
- package/package.json +19 -18
- package/src/editor/editor.js +1 -1
- package/src/editor/editorconfig.jsdoc +18 -5
- package/src/editor/utils/elementapimixin.js +19 -2
- package/src/plugincollection.js +1 -1
package/lang/translations/ur.po
CHANGED
|
@@ -43,3 +43,7 @@ msgstr "0% میں سے 1%"
|
|
|
43
43
|
msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
|
|
44
44
|
msgid "Cannot upload file:"
|
|
45
45
|
msgstr "فائل اپلوڈ نہیں ہو سکی:"
|
|
46
|
+
|
|
47
|
+
msgctxt "Accessible label of the specific editing area of the editor acting as a root of the entire application."
|
|
48
|
+
msgid "Rich Text Editor. Editing area: %0"
|
|
49
|
+
msgstr "خانۂ ترمیم۔ علاقۂ ترمیم 0%"
|
package/lang/translations/uz.po
CHANGED
|
@@ -43,3 +43,7 @@ msgstr ""
|
|
|
43
43
|
msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
|
|
44
44
|
msgid "Cannot upload file:"
|
|
45
45
|
msgstr ""
|
|
46
|
+
|
|
47
|
+
msgctxt "Accessible label of the specific editing area of the editor acting as a root of the entire application."
|
|
48
|
+
msgid "Rich Text Editor. Editing area: %0"
|
|
49
|
+
msgstr ""
|
package/lang/translations/vi.po
CHANGED
|
@@ -26,7 +26,7 @@ msgstr "Xóa màu"
|
|
|
26
26
|
|
|
27
27
|
msgctxt "The label used by a button next to the color palette in the color picker that restores the default value if the default table properties are specified."
|
|
28
28
|
msgid "Restore default"
|
|
29
|
-
msgstr ""
|
|
29
|
+
msgstr "Khôi phục giá trị mặc định"
|
|
30
30
|
|
|
31
31
|
msgctxt "Label for the Save button."
|
|
32
32
|
msgid "Save"
|
|
@@ -43,3 +43,7 @@ msgstr "%0 đến %1"
|
|
|
43
43
|
msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
|
|
44
44
|
msgid "Cannot upload file:"
|
|
45
45
|
msgstr "Không thể tải file:"
|
|
46
|
+
|
|
47
|
+
msgctxt "Accessible label of the specific editing area of the editor acting as a root of the entire application."
|
|
48
|
+
msgid "Rich Text Editor. Editing area: %0"
|
|
49
|
+
msgstr "Trình chỉnh sửa Văn bản dạng RTF. Vùng chỉnh sửa: %0"
|
|
@@ -43,3 +43,7 @@ msgstr "第 %0 步,共 %1 步"
|
|
|
43
43
|
msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
|
|
44
44
|
msgid "Cannot upload file:"
|
|
45
45
|
msgstr "无法上传的文件:"
|
|
46
|
+
|
|
47
|
+
msgctxt "Accessible label of the specific editing area of the editor acting as a root of the entire application."
|
|
48
|
+
msgid "Rich Text Editor. Editing area: %0"
|
|
49
|
+
msgstr "富文本编辑器。编辑区域:%0"
|
package/lang/translations/zh.po
CHANGED
|
@@ -43,3 +43,7 @@ msgstr "%0/%1"
|
|
|
43
43
|
msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
|
|
44
44
|
msgid "Cannot upload file:"
|
|
45
45
|
msgstr "無法上傳檔案:"
|
|
46
|
+
|
|
47
|
+
msgctxt "Accessible label of the specific editing area of the editor acting as a root of the entire application."
|
|
48
|
+
msgid "Rich Text Editor. Editing area: %0"
|
|
49
|
+
msgstr "RTF 編輯器。編輯區:%0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "The core architecture of CKEditor 5 – the best browser-based rich text editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wysiwyg",
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
],
|
|
24
24
|
"main": "src/index.js",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
27
|
-
"@ckeditor/ckeditor5-ui": "^
|
|
28
|
-
"@ckeditor/ckeditor5-utils": "^
|
|
26
|
+
"@ckeditor/ckeditor5-engine": "^35.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-ui": "^35.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-utils": "^35.0.0",
|
|
29
29
|
"lodash-es": "^4.17.15"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ckeditor/ckeditor5-autoformat": "^
|
|
33
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
|
34
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
35
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
36
|
-
"@ckeditor/ckeditor5-essentials": "^
|
|
37
|
-
"@ckeditor/ckeditor5-heading": "^
|
|
38
|
-
"@ckeditor/ckeditor5-image": "^
|
|
39
|
-
"@ckeditor/ckeditor5-indent": "^
|
|
40
|
-
"@ckeditor/ckeditor5-link": "^
|
|
41
|
-
"@ckeditor/ckeditor5-list": "^
|
|
42
|
-
"@ckeditor/ckeditor5-media-embed": "^
|
|
43
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
44
|
-
"@ckeditor/ckeditor5-table": "^
|
|
32
|
+
"@ckeditor/ckeditor5-autoformat": "^35.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-basic-styles": "^35.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-block-quote": "^35.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-editor-classic": "^35.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-essentials": "^35.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-heading": "^35.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-image": "^35.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-indent": "^35.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-link": "^35.0.0",
|
|
41
|
+
"@ckeditor/ckeditor5-list": "^35.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-media-embed": "^35.0.0",
|
|
43
|
+
"@ckeditor/ckeditor5-paragraph": "^35.0.0",
|
|
44
|
+
"@ckeditor/ckeditor5-table": "^35.0.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=14.0.0",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"lang",
|
|
61
61
|
"src",
|
|
62
62
|
"theme",
|
|
63
|
-
"ckeditor5-metadata.json"
|
|
63
|
+
"ckeditor5-metadata.json",
|
|
64
|
+
"CHANGELOG.md"
|
|
64
65
|
]
|
|
65
66
|
}
|
package/src/editor/editor.js
CHANGED
|
@@ -481,7 +481,7 @@ mix( Editor, ObservableMixin );
|
|
|
481
481
|
* This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.
|
|
482
482
|
*
|
|
483
483
|
* The only editor type which can be initialized on `<textarea>` elements is
|
|
484
|
-
* the {@glink installation/
|
|
484
|
+
* the {@glink installation/getting-started/predefined-builds#classic-editor classic editor}.
|
|
485
485
|
* 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
|
|
486
486
|
* editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:
|
|
487
487
|
*
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* .then( ... )
|
|
25
25
|
* .catch( ... );
|
|
26
26
|
*
|
|
27
|
-
* Check the {@glink installation/
|
|
27
|
+
* Check the {@glink installation/getting-started/predefined-builds Configuration guide} for more information
|
|
28
28
|
* about setting configuration options.
|
|
29
29
|
*
|
|
30
30
|
* @interface EditorConfig
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
/**
|
|
67
67
|
* The list of plugins to load.
|
|
68
68
|
*
|
|
69
|
-
* If you use an {@glink installation/
|
|
69
|
+
* If you use an {@glink installation/getting-started/predefined-builds editor build} you can define the list of plugins to load
|
|
70
70
|
* using the names of plugins that are available:
|
|
71
71
|
*
|
|
72
72
|
* const config = {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* The list of additional plugins to load along those already available in the
|
|
101
|
-
* {@glink installation/
|
|
101
|
+
* {@glink installation/getting-started/predefined-builds editor build}. It extends the {@link #plugins `plugins`} configuration.
|
|
102
102
|
*
|
|
103
103
|
* function MyPlugin( editor ) {
|
|
104
104
|
* // ...
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
*
|
|
111
111
|
* **Note:** This configuration works only for simple plugins which utilize the
|
|
112
112
|
* {@link module:core/plugin~PluginInterface plugin interface} and have no dependencies. To extend a
|
|
113
|
-
* build with complex features, create a {@glink installation/getting-started/quick-start#creating-custom-builds-with-online-builder custom build}.
|
|
113
|
+
* build with complex features, create a {@glink installation/getting-started/quick-start-other#creating-custom-builds-with-online-builder custom build}.
|
|
114
114
|
*
|
|
115
115
|
* **Note:** Make sure you include the new features in you toolbar configuration. Learn more
|
|
116
116
|
* about the {@glink features/toolbar/toolbar toolbar setup}.
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
*/
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* The list of plugins which should not be loaded despite being available in an {@glink installation/
|
|
122
|
+
* The list of plugins which should not be loaded despite being available in an {@glink installation/getting-started/predefined-builds editor build}.
|
|
123
123
|
*
|
|
124
124
|
* const config = {
|
|
125
125
|
* removePlugins: [ 'Bold', 'Italic' ]
|
|
@@ -327,3 +327,16 @@
|
|
|
327
327
|
*
|
|
328
328
|
* @member {Object} module:core/editor/editorconfig~EditorConfig#ui
|
|
329
329
|
*/
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Enables updating the source element after the editor destroy.
|
|
333
|
+
*
|
|
334
|
+
* Enabling this option might have some security implications, as the editor doesn't have control over all data
|
|
335
|
+
* in the output.
|
|
336
|
+
*
|
|
337
|
+
* Be careful, especially while using
|
|
338
|
+
* {@glink features/markdown Markdown}, {@glink features/general-html-support General HTML Support} or
|
|
339
|
+
* {@glink features/html-embed HTML embed} features.
|
|
340
|
+
*
|
|
341
|
+
* @member {Boolean} module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy
|
|
342
|
+
*/
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/* globals HTMLTextAreaElement */
|
|
7
|
+
|
|
6
8
|
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
7
9
|
import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement';
|
|
8
10
|
|
|
@@ -20,7 +22,7 @@ const ElementApiMixin = {
|
|
|
20
22
|
/**
|
|
21
23
|
* @inheritDoc
|
|
22
24
|
*/
|
|
23
|
-
updateSourceElement() {
|
|
25
|
+
updateSourceElement( data = this.data.get() ) {
|
|
24
26
|
if ( !this.sourceElement ) {
|
|
25
27
|
/**
|
|
26
28
|
* Cannot update the source element of a detached editor.
|
|
@@ -36,7 +38,20 @@ const ElementApiMixin = {
|
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
const shouldUpdateSourceElement = this.config.get( 'updateSourceElementOnDestroy' );
|
|
42
|
+
const isSourceElementTextArea = this.sourceElement instanceof HTMLTextAreaElement;
|
|
43
|
+
|
|
44
|
+
// The data returned by the editor might be unsafe, so we want to prevent rendering
|
|
45
|
+
// unsafe content inside the source element different than <textarea>, which is considered
|
|
46
|
+
// secure. This behaviour could be changed by setting the `updateSourceElementOnDestroy`
|
|
47
|
+
// configuration option to `true`.
|
|
48
|
+
if ( !shouldUpdateSourceElement && !isSourceElementTextArea ) {
|
|
49
|
+
setDataInElement( this.sourceElement, '' );
|
|
50
|
+
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
setDataInElement( this.sourceElement, data );
|
|
40
55
|
}
|
|
41
56
|
};
|
|
42
57
|
|
|
@@ -62,4 +77,6 @@ export default ElementApiMixin;
|
|
|
62
77
|
* Updates the {@link #sourceElement editor source element}'s content with the data.
|
|
63
78
|
*
|
|
64
79
|
* @method #updateSourceElement
|
|
80
|
+
* @param {String} data The data that should be used to update the source element.
|
|
81
|
+
* By default, it is taken directly from the existing editor instance.
|
|
65
82
|
*/
|
package/src/plugincollection.js
CHANGED
|
@@ -344,7 +344,7 @@ export default class PluginCollection {
|
|
|
344
344
|
* This is usually done in CKEditor 5 builds by setting the {@link module:core/editor/editor~Editor.builtinPlugins}
|
|
345
345
|
* property.
|
|
346
346
|
*
|
|
347
|
-
* **If you see this warning when using one of the {@glink installation/
|
|
347
|
+
* **If you see this warning when using one of the {@glink installation/getting-started/predefined-builds
|
|
348
348
|
* CKEditor 5 Builds}**,
|
|
349
349
|
* it means that you try to enable a plugin which was not included in that build. This may be due to a typo
|
|
350
350
|
* in the plugin name or simply because that plugin is not a part of this build. In the latter scenario,
|