@ckeditor/ckeditor5-basic-styles
Advanced tools
Comparing version
Changelog | ||
========= | ||
## [15.0.0](https://github.com/ckeditor/ckeditor5-basic-styles/compare/v11.1.4...v15.0.0) (2019-10-23) | ||
### Features | ||
* Provided support for numeric values for the `font-weight` attribute. Closes [#94](https://github.com/ckeditor/ckeditor5-basic-styles/issues/94). Closes [ckeditor/ckeditor5-paste-from-office#74](https://github.com/ckeditor/ckeditor5-paste-from-office/issues/74). ([25a0d7c](https://github.com/ckeditor/ckeditor5-basic-styles/commit/25a0d7c)) | ||
### Other changes | ||
* Added `pluginName` property to editing plugins. ([d91773f](https://github.com/ckeditor/ckeditor5-basic-styles/commit/d91773f)) | ||
* Updated translations. ([56d6060](https://github.com/ckeditor/ckeditor5-basic-styles/commit/56d6060)) | ||
## [11.1.4](https://github.com/ckeditor/ckeditor5-basic-styles/compare/v11.1.3...v11.1.4) (2019-08-26) | ||
@@ -5,0 +17,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-basic-styles", | ||
"version": "11.1.4", | ||
"version": "15.0.0", | ||
"description": "Basic styles feature for CKEditor 5.", | ||
@@ -13,12 +13,12 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^12.3.0", | ||
"@ckeditor/ckeditor5-ui": "^14.0.0" | ||
"@ckeditor/ckeditor5-core": "^15.0.0", | ||
"@ckeditor/ckeditor5-ui": "^15.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.4", | ||
"@ckeditor/ckeditor5-engine": "^14.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^11.0.5", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.5", | ||
"@ckeditor/ckeditor5-remove-format": "^10.0.4", | ||
"@ckeditor/ckeditor5-utils": "^14.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^15.0.0", | ||
"@ckeditor/ckeditor5-engine": "^15.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^15.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^15.0.0", | ||
"@ckeditor/ckeditor5-remove-format": "^15.0.0", | ||
"@ckeditor/ckeditor5-utils": "^15.0.0", | ||
"eslint": "^5.5.0", | ||
@@ -25,0 +25,0 @@ "eslint-config-ckeditor5": "^2.0.0", |
CKEditor 5 basic styles feature | ||
======================================== | ||
[](https://gitter.im/ckeditor/ckeditor5?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-basic-styles) | ||
@@ -6,0 +5,0 @@ [](https://travis-ci.org/ckeditor/ckeditor5-basic-styles) |
@@ -27,2 +27,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'BoldEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -38,3 +45,2 @@ const editor = this.editor; | ||
// Build converter from model to view for data and editing pipelines. | ||
editor.conversion.attributeToElement( { | ||
@@ -45,6 +51,16 @@ model: BOLD, | ||
'b', | ||
{ | ||
styles: { | ||
'font-weight': 'bold' | ||
viewElement => { | ||
const fontWeight = viewElement.getStyle( 'font-weight' ); | ||
if ( !fontWeight ) { | ||
return null; | ||
} | ||
// Value of the `font-weight` attribute can be defined as a string or a number. | ||
if ( fontWeight == 'bold' || Number( fontWeight ) >= 600 ) { | ||
return { | ||
name: true, | ||
styles: [ 'font-weight' ] | ||
}; | ||
} | ||
} | ||
@@ -51,0 +67,0 @@ ] |
@@ -27,2 +27,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'CodeEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -29,0 +36,0 @@ const editor = this.editor; |
@@ -27,2 +27,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'ItalicEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -29,0 +36,0 @@ const editor = this.editor; |
@@ -28,2 +28,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'StrikethroughEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -30,0 +37,0 @@ const editor = this.editor; |
@@ -27,2 +27,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'SubscriptEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -29,0 +36,0 @@ const editor = this.editor; |
@@ -27,2 +27,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'SuperscriptEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -29,0 +36,0 @@ const editor = this.editor; |
@@ -27,2 +27,9 @@ /** | ||
*/ | ||
static get pluginName() { | ||
return 'UnderlineEditing'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
init() { | ||
@@ -29,0 +36,0 @@ const editor = this.editor; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
131507
1.19%1044
5.03%24
-4%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed