@ckeditor/ckeditor5-restricted-editing 43.3.1 → 44.0.0-alpha.1
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 +13 -7
- package/build/restricted-editing.js +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/restrictededitingmodeediting.js +10 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-restricted-editing",
|
3
|
-
"version": "
|
3
|
+
"version": "44.0.0-alpha.1",
|
4
4
|
"description": "Restricted editing feature for CKEditor 5 editors.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,11 +12,11 @@
|
|
12
12
|
"type": "module",
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"@ckeditor/ckeditor5-core": "
|
16
|
-
"@ckeditor/ckeditor5-engine": "
|
17
|
-
"@ckeditor/ckeditor5-ui": "
|
18
|
-
"@ckeditor/ckeditor5-utils": "
|
19
|
-
"ckeditor5": "
|
15
|
+
"@ckeditor/ckeditor5-core": "44.0.0-alpha.1",
|
16
|
+
"@ckeditor/ckeditor5-engine": "44.0.0-alpha.1",
|
17
|
+
"@ckeditor/ckeditor5-ui": "44.0.0-alpha.1",
|
18
|
+
"@ckeditor/ckeditor5-utils": "44.0.0-alpha.1",
|
19
|
+
"ckeditor5": "44.0.0-alpha.1"
|
20
20
|
},
|
21
21
|
"author": "CKSource (http://cksource.com/)",
|
22
22
|
"license": "GPL-2.0-or-later",
|
@@ -74,6 +74,16 @@ export default class RestrictedEditingModeEditing extends Plugin {
|
|
74
74
|
writer.addClass('ck-restricted-editing_mode_restricted', root);
|
75
75
|
}
|
76
76
|
});
|
77
|
+
// Remove existing restricted editing markers when setting new data to prevent marker resurrection.
|
78
|
+
// Without this, markers from removed content would be incorrectly restored due to the resurrection mechanism.
|
79
|
+
// See more: https://github.com/ckeditor/ckeditor5/issues/9646#issuecomment-843064995
|
80
|
+
editor.data.on('set', () => {
|
81
|
+
editor.model.change(writer => {
|
82
|
+
for (const marker of editor.model.markers.getMarkersGroup('restrictedEditingException')) {
|
83
|
+
writer.removeMarker(marker.name);
|
84
|
+
}
|
85
|
+
});
|
86
|
+
}, { priority: 'high' });
|
77
87
|
}
|
78
88
|
/**
|
79
89
|
* Makes the given command always enabled in the restricted editing mode (regardless
|