@ckeditor/ckeditor5-core 38.2.0-alpha.0 → 39.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/README.md CHANGED
@@ -4,7 +4,6 @@ CKEditor 5 core editor architecture
4
4
  [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-core.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-core)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
6
6
  [![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
7
- ![Dependency Status](https://img.shields.io/librariesio/release/npm/@ckeditor/ckeditor5-core)
8
7
 
9
8
  This package implements CKEditor 5's core editor architecture — a set of classes and interfaces which glue everything together.
10
9
 
@@ -46,4 +46,4 @@ msgstr "Datoteku nije moguće poslati:"
46
46
 
47
47
  msgctxt "Accessible label of the specific editing area of the editor acting as a root of the entire application."
48
48
  msgid "Rich Text Editor. Editing area: %0"
49
- msgstr ""
49
+ msgstr "Uređivač obogaćenog teksta. Područje za uređivanje: %0"
@@ -22,7 +22,7 @@ msgstr "Anulo"
22
22
 
23
23
  msgctxt "The label used by a button next to the color palette in the color picker that removes the color (resets it to an empty value, example usages in font color or table properties)."
24
24
  msgid "Remove color"
25
- msgstr ""
25
+ msgstr "Largo ngjyrën"
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-core",
3
- "version": "38.2.0-alpha.0",
3
+ "version": "39.0.0",
4
4
  "description": "The core architecture of CKEditor 5 – the best browser-based rich text editor.",
5
5
  "keywords": [
6
6
  "wysiwyg",
@@ -22,11 +22,10 @@
22
22
  "ckeditor5-dll"
23
23
  ],
24
24
  "main": "src/index.js",
25
- "type": "module",
26
25
  "dependencies": {
27
- "@ckeditor/ckeditor5-engine": "38.2.0-alpha.0",
28
- "@ckeditor/ckeditor5-utils": "38.2.0-alpha.0",
29
- "lodash-es": "^4.17.15"
26
+ "@ckeditor/ckeditor5-engine": "39.0.0",
27
+ "@ckeditor/ckeditor5-utils": "39.0.0",
28
+ "lodash-es": "4.17.21"
30
29
  },
31
30
  "engines": {
32
31
  "node": ">=16.0.0",
package/src/command.js CHANGED
@@ -46,9 +46,14 @@ export default class Command extends ObservableMixin() {
46
46
  if (!this.affectsData) {
47
47
  return;
48
48
  }
49
+ const selection = editor.model.document.selection;
50
+ const selectionInGraveyard = selection.getFirstPosition().root.rootName == '$graveyard';
51
+ const canEditAtSelection = !selectionInGraveyard && editor.model.canEditAt(selection);
52
+ // Disable if editor is read only, or when selection is in a place which cannot be edited.
53
+ //
49
54
  // Checking `editor.isReadOnly` is needed for all commands that have `_isEnabledBasedOnSelection == false`.
50
55
  // E.g. undo does not base on selection, but affects data and should be disabled when the editor is in read-only mode.
51
- if (editor.isReadOnly || this._isEnabledBasedOnSelection && !editor.model.canEditAt(editor.model.document.selection)) {
56
+ if (editor.isReadOnly || this._isEnabledBasedOnSelection && !canEditAtSelection) {
52
57
  evt.return = false;
53
58
  evt.stop();
54
59
  }