@ckeditor/ckeditor5-basic-styles
Advanced tools
Comparing version 20.0.0 to 21.0.0
{ | ||
"name": "@ckeditor/ckeditor5-basic-styles", | ||
"version": "20.0.0", | ||
"version": "21.0.0", | ||
"description": "Basic styles feature for CKEditor 5.", | ||
@@ -13,12 +13,13 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^20.0.0", | ||
"@ckeditor/ckeditor5-ui": "^20.0.0" | ||
"@ckeditor/ckeditor5-core": "^21.0.0", | ||
"@ckeditor/ckeditor5-typing": "^21.0.0", | ||
"@ckeditor/ckeditor5-ui": "^21.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-editor-classic": "^20.0.0", | ||
"@ckeditor/ckeditor5-engine": "^20.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^20.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^20.0.0", | ||
"@ckeditor/ckeditor5-remove-format": "^20.0.0", | ||
"@ckeditor/ckeditor5-utils": "^20.0.0" | ||
"@ckeditor/ckeditor5-editor-classic": "^21.0.0", | ||
"@ckeditor/ckeditor5-engine": "^21.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^21.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^21.0.0", | ||
"@ckeditor/ckeditor5-remove-format": "^21.0.0", | ||
"@ckeditor/ckeditor5-utils": "^21.0.0" | ||
}, | ||
@@ -25,0 +26,0 @@ "engines": { |
@@ -12,4 +12,7 @@ /** | ||
import AttributeCommand from '../attributecommand'; | ||
import TwoStepCaretMovement from '@ckeditor/ckeditor5-typing/src/twostepcaretmovement'; | ||
import setupHighlight from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight'; | ||
const CODE = 'code'; | ||
const HIGHLIGHT_CLASS = 'ck-code_selected'; | ||
@@ -35,2 +38,9 @@ /** | ||
*/ | ||
static get requires() { | ||
return [ TwoStepCaretMovement ]; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -58,3 +68,9 @@ const editor = this.editor; | ||
editor.commands.add( CODE, new AttributeCommand( editor, CODE ) ); | ||
// Enable two-step caret movement for `code` attribute. | ||
editor.plugins.get( TwoStepCaretMovement ).registerAttribute( CODE ); | ||
// Setup highlight over selected element. | ||
setupHighlight( editor, CODE, 'code', HIGHLIGHT_CLASS ); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
137453
94
1081
3
+ Added@ckeditor/ckeditor5-core@21.0.0(transitive)
+ Added@ckeditor/ckeditor5-engine@21.0.0(transitive)
+ Added@ckeditor/ckeditor5-typing@21.0.0(transitive)
+ Added@ckeditor/ckeditor5-ui@21.0.0(transitive)
+ Added@ckeditor/ckeditor5-utils@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-core@20.0.0(transitive)
- Removed@ckeditor/ckeditor5-engine@20.0.0(transitive)
- Removed@ckeditor/ckeditor5-ui@20.0.0(transitive)
- Removed@ckeditor/ckeditor5-utils@20.0.0(transitive)