-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8454 from ckeditor/i/8233
Fix (font): Fixed the [`fontSize.supportAllValues`](https://ckeditor.com/docs/ckeditor5/latest/api/module_font_fontsize-FontSizeConfig.html#member-supportAllValues) configuration for the [`FontSize`](https://ckeditor.com/docs/ckeditor5/latest/api/module_font_fontsize-FontSize.html) plugin to work with nested elements. Closes #8233.
- Loading branch information
Showing
6 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="editor"> | ||
<p> | ||
<span style="font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif"><span style="font-size: 28px">LUCIDA, 28px</span></span> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals window, document, console */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
import FontSize from '../../../../src/fontsize'; | ||
import FontFamily from '../../../../src/fontfamily'; | ||
|
||
const config = { | ||
plugins: [ ArticlePluginSet, FontSize, FontFamily ], | ||
toolbar: [ | ||
'heading', '|', 'fontFamily', 'fontSize', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' | ||
], | ||
fontSize: { | ||
options: [ 10, 12, 14, 'default', 18, 20, 22 ], | ||
supportAllValues: true | ||
}, | ||
fontFamily: { | ||
supportAllValues: true | ||
} | ||
}; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#editor' ), config ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( error => { | ||
console.error( error.stack ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## The supportAllValues doesn't work with nested elements [#8233](https://github.com/ckeditor/ckeditor5/issues/8233) | ||
|
||
1. Open CKEditor Inspector (if not already opened) and go to `View` tab. | ||
|
||
**Expected result**: the `<span>` element has both `font-family` **and** `font-size` styles. | ||
|
||
**Unexpected result**: the `<span>` element lost nested `font-size` style. |