@ckeditor/ckeditor5-widget
Advanced tools
Comparing version 0.2.0 to 1.0.0-alpha.1
Changelog | ||
========= | ||
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-widget/compare/v0.2.0...v1.0.0-alpha.1) (2017-10-03) | ||
### Bug fixes | ||
* <kbd>Backspace</kbd> and <kbd>Delete</kbd> should not delete a widget when the editor is in the read-only mode. Closes [#6](https://github.com/ckeditor/ckeditor5-widget/issues/6). ([5f64125](https://github.com/ckeditor/ckeditor5-widget/commit/5f64125)) | ||
* Nested element structures next to widgets will be correctly removed when pressing <kbd>Backspace</kbd> or <kbd>Delete</kbd>. Closes [#19](https://github.com/ckeditor/ckeditor5-widget/issues/19). ([27ee848](https://github.com/ckeditor/ckeditor5-widget/commit/27ee848)) | ||
## [0.2.0](https://github.com/ckeditor/ckeditor5-widget/compare/v0.1.1...v0.2.0) (2017-09-03) | ||
@@ -5,0 +13,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-widget", | ||
"version": "0.2.0", | ||
"version": "1.0.0-alpha.1", | ||
"description": "Widget API for CKEditor 5.", | ||
"keywords": [], | ||
"keywords": [ | ||
"ckeditor5", | ||
"ckeditor5-lib" | ||
], | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^0.9.0", | ||
"@ckeditor/ckeditor5-engine": "^0.11.0", | ||
"@ckeditor/ckeditor5-utils": "^0.10.0", | ||
"@ckeditor/ckeditor5-theme-lark": "^0.9.0" | ||
"@ckeditor/ckeditor5-core": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-engine": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-utils": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-alpha.1" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-dev-lint": "^3.1.0", | ||
"eslint-config-ckeditor5": "^1.0.5", | ||
"@ckeditor/ckeditor5-dev-lint": "^3.1.4", | ||
"eslint-config-ckeditor5": "^1.0.6", | ||
"gulp": "^3.9.1", | ||
@@ -29,3 +32,8 @@ "guppy-pre-commit": "^0.4.0" | ||
"url": "https://github.com/ckeditor/ckeditor5-widget.git" | ||
} | ||
}, | ||
"files": [ | ||
"lang", | ||
"src", | ||
"theme" | ||
] | ||
} |
@@ -11,6 +11,10 @@ CKEditor 5 widget API | ||
Widget API for CKEditor 5. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-widget>. | ||
This package implements the widget API for CKEditor 5. | ||
## Documentation | ||
See the [`@ckeditor/ckeditor5-widget` package](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/api/widget.html) page in [CKEditor 5 documentation](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/). | ||
## License | ||
Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the `LICENSE.md` file. |
@@ -156,2 +156,7 @@ /** | ||
_handleDelete( isForward ) { | ||
// Do nothing when the read only mode is enabled. | ||
if ( this.editor.isReadOnly ) { | ||
return; | ||
} | ||
const modelDocument = this.editor.document; | ||
@@ -169,8 +174,11 @@ const modelSelection = modelDocument.selection; | ||
modelDocument.enqueueChanges( () => { | ||
const batch = modelDocument.batch(); | ||
let previousNode = modelSelection.anchor.parent; | ||
// Remove previous element if empty. | ||
const previousNode = modelSelection.anchor.parent; | ||
while ( previousNode.isEmpty ) { | ||
const nodeToRemove = previousNode; | ||
previousNode = nodeToRemove.parent; | ||
if ( previousNode.isEmpty ) { | ||
const batch = modelDocument.batch(); | ||
batch.remove( previousNode ); | ||
batch.remove( nodeToRemove ); | ||
} | ||
@@ -177,0 +185,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20
29296
8
570
+ Added@ckeditor/ckeditor5-core@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-engine@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-theme-lark@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-ui@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-utils@1.0.0-beta.4(transitive)
- Removed@ckeditor/ckeditor5-core@0.9.0(transitive)
- Removed@ckeditor/ckeditor5-engine@0.11.0(transitive)
- Removed@ckeditor/ckeditor5-theme-lark@0.9.0(transitive)
- Removed@ckeditor/ckeditor5-ui@0.10.0(transitive)
- Removed@ckeditor/ckeditor5-utils@0.10.0(transitive)