@ckeditor/ckeditor5-core 34.0.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 +6 -2
- package/lang/contexts.json +3 -1
- package/lang/translations/af.po +12 -4
- package/lang/translations/ar.po +12 -4
- package/lang/translations/ast.po +8 -0
- package/lang/translations/az.po +8 -0
- package/lang/translations/bg.po +12 -4
- package/lang/translations/bn.po +49 -0
- package/lang/translations/bs.po +8 -0
- package/lang/translations/ca.po +12 -4
- 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.po +9 -1
- package/lang/translations/et.po +9 -1
- package/lang/translations/eu.po +8 -0
- package/lang/translations/fa.po +8 -0
- package/lang/translations/fi.po +10 -2
- package/lang/translations/fr.po +10 -2
- package/lang/translations/gl.po +8 -0
- package/lang/translations/gu.po +49 -0
- package/lang/translations/he.po +11 -3
- package/lang/translations/hi.po +9 -1
- package/lang/translations/hr.po +8 -0
- package/lang/translations/hu.po +8 -0
- package/lang/translations/id.po +10 -2
- package/lang/translations/it.po +9 -1
- package/lang/translations/ja.po +11 -3
- 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 +9 -1
- package/lang/translations/ku.po +8 -0
- package/lang/translations/lt.po +11 -3
- package/lang/translations/lv.po +9 -1
- package/lang/translations/ms.po +49 -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 +9 -1
- package/lang/translations/pt.po +13 -5
- package/lang/translations/ro.po +8 -0
- package/lang/translations/ru.po +8 -0
- package/lang/translations/si.po +49 -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 +12 -4
- package/lang/translations/th.po +11 -3
- package/lang/translations/tk.po +8 -0
- package/lang/translations/tr.po +9 -1
- package/lang/translations/tt.po +8 -0
- package/lang/translations/ug.po +8 -0
- package/lang/translations/uk.po +9 -1
- package/lang/translations/ur.po +49 -0
- package/lang/translations/uz.po +8 -0
- package/lang/translations/vi.po +9 -1
- package/lang/translations/zh-cn.po +8 -0
- package/lang/translations/zh.po +8 -0
- package/package.json +19 -18
- package/src/editor/editor.js +14 -3
- package/src/editor/editorconfig.jsdoc +18 -5
- package/src/editor/utils/elementapimixin.js +19 -2
- package/src/plugincollection.js +1 -1
|
@@ -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,
|