@ckeditor/ckeditor5-core 30.0.0 → 31.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.
@@ -26,7 +26,7 @@ msgstr "Otkloni boju"
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 "Vrati podrazumevano"
30
30
 
31
31
  msgctxt "Label for the Save button."
32
32
  msgid "Save"
@@ -26,7 +26,7 @@ msgstr "Отклони боју"
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 "Врати подразумевано"
30
30
 
31
31
  msgctxt "Label for the Save button."
32
32
  msgid "Save"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-core",
3
- "version": "30.0.0",
3
+ "version": "31.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": "^30.0.0",
27
- "@ckeditor/ckeditor5-ui": "^30.0.0",
28
- "@ckeditor/ckeditor5-utils": "^30.0.0",
26
+ "@ckeditor/ckeditor5-engine": "^31.0.0",
27
+ "@ckeditor/ckeditor5-ui": "^31.0.0",
28
+ "@ckeditor/ckeditor5-utils": "^31.0.0",
29
29
  "lodash-es": "^4.17.15"
30
30
  },
31
31
  "devDependencies": {
32
- "@ckeditor/ckeditor5-autoformat": "^30.0.0",
33
- "@ckeditor/ckeditor5-basic-styles": "^30.0.0",
34
- "@ckeditor/ckeditor5-block-quote": "^30.0.0",
35
- "@ckeditor/ckeditor5-editor-classic": "^30.0.0",
36
- "@ckeditor/ckeditor5-essentials": "^30.0.0",
37
- "@ckeditor/ckeditor5-heading": "^30.0.0",
38
- "@ckeditor/ckeditor5-image": "^30.0.0",
39
- "@ckeditor/ckeditor5-indent": "^30.0.0",
40
- "@ckeditor/ckeditor5-link": "^30.0.0",
41
- "@ckeditor/ckeditor5-list": "^30.0.0",
42
- "@ckeditor/ckeditor5-media-embed": "^30.0.0",
43
- "@ckeditor/ckeditor5-paragraph": "^30.0.0",
44
- "@ckeditor/ckeditor5-table": "^30.0.0"
32
+ "@ckeditor/ckeditor5-autoformat": "^31.0.0",
33
+ "@ckeditor/ckeditor5-basic-styles": "^31.0.0",
34
+ "@ckeditor/ckeditor5-block-quote": "^31.0.0",
35
+ "@ckeditor/ckeditor5-editor-classic": "^31.0.0",
36
+ "@ckeditor/ckeditor5-essentials": "^31.0.0",
37
+ "@ckeditor/ckeditor5-heading": "^31.0.0",
38
+ "@ckeditor/ckeditor5-image": "^31.0.0",
39
+ "@ckeditor/ckeditor5-indent": "^31.0.0",
40
+ "@ckeditor/ckeditor5-link": "^31.0.0",
41
+ "@ckeditor/ckeditor5-list": "^31.0.0",
42
+ "@ckeditor/ckeditor5-media-embed": "^31.0.0",
43
+ "@ckeditor/ckeditor5-paragraph": "^31.0.0",
44
+ "@ckeditor/ckeditor5-table": "^31.0.0"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=12.0.0",
package/src/command.js CHANGED
@@ -20,7 +20,8 @@ import mix from '@ckeditor/ckeditor5-utils/src/mix';
20
20
  * Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands `editor.commands`}.
21
21
  * The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute `editor.execute()`}.
22
22
  *
23
- * By default commands are disabled when the editor is in {@link module:core/editor/editor~Editor#isReadOnly read-only} mode.
23
+ * By default, commands are disabled when the editor is in {@link module:core/editor/editor~Editor#isReadOnly read-only} mode
24
+ * but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.
24
25
  *
25
26
  * @mixes module:utils/observablemixin~ObservableMixin
26
27
  */
@@ -96,6 +97,21 @@ export default class Command {
96
97
  */
97
98
  this.set( 'isEnabled', false );
98
99
 
100
+ /**
101
+ * A flag indicating whether a command execution changes the editor data or not.
102
+ *
103
+ * Commands with `affectsData` set to `false` will not be automatically disabled in
104
+ * {@link module:core/editor/editor~Editor#isReadOnly read-only mode} and
105
+ * {@glink features/read-only#related-features other editor modes} with restricted user write permissions.
106
+ *
107
+ * **Note:** You do not have to set it for your every command. It will be `true` by default.
108
+ *
109
+ * @readonly
110
+ * @default true
111
+ * @member {Boolean} #affectsData
112
+ */
113
+ this.affectsData = true;
114
+
99
115
  /**
100
116
  * Holds identifiers for {@link #forceDisabled} mechanism.
101
117
  *
@@ -119,7 +135,7 @@ export default class Command {
119
135
 
120
136
  // By default commands are disabled when the editor is in read-only mode.
121
137
  this.listenTo( editor, 'change:isReadOnly', ( evt, name, value ) => {
122
- if ( value ) {
138
+ if ( value && this.affectsData ) {
123
139
  this.forceDisabled( 'readOnlyMode' );
124
140
  } else {
125
141
  this.clearForceDisabled( 'readOnlyMode' );
@@ -357,7 +357,8 @@ mix( Editor, ObservableMixin );
357
357
  /**
358
358
  * This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.
359
359
  *
360
- * The only editor type which can be initialized on `<textarea>` elements is {@glink builds/guides/overview#classic-editor classic editor}.
360
+ * The only editor type which can be initialized on `<textarea>` elements is
361
+ * the {@glink builds/guides/predefined-builds/overview#classic-editor classic editor}.
361
362
  * 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
362
363
  * editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:
363
364
  *
@@ -62,7 +62,7 @@
62
62
  /**
63
63
  * The list of plugins to load.
64
64
  *
65
- * If you use an {@glink builds/guides/overview editor build} you can define the list of plugins to load
65
+ * If you use an {@glink builds/guides/predefined-builds/overview editor build} you can define the list of plugins to load
66
66
  * using the names of plugins that are available:
67
67
  *
68
68
  * const config = {
@@ -94,7 +94,7 @@
94
94
 
95
95
  /**
96
96
  * The list of additional plugins to load along those already available in the
97
- * {@glink builds/guides/overview editor build}. It extends the {@link #plugins `plugins`} configuration.
97
+ * {@glink builds/guides/predefined-builds/overview editor build}. It extends the {@link #plugins `plugins`} configuration.
98
98
  *
99
99
  * function MyPlugin( editor ) {
100
100
  * // ...
@@ -115,7 +115,7 @@
115
115
  */
116
116
 
117
117
  /**
118
- * The list of plugins which should not be loaded despite being available in an {@glink builds/guides/overview editor build}.
118
+ * The list of plugins which should not be loaded despite being available in an {@glink builds/guides/predefined-builds/overview editor build}.
119
119
  *
120
120
  * const config = {
121
121
  * removePlugins: [ 'Bold', 'Italic' ]