Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into t/ckeditor5/1457
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Mar 29, 2019
2 parents 2ab56e7 + d9f0a51 commit e153ead
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"@ckeditor/ckeditor5-utils": "^12.0.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-cloud-services": "^11.0.0",
"@ckeditor/ckeditor5-editor-classic": "^12.0.0",
"@ckeditor/ckeditor5-engine": "^13.0.0",
"@ckeditor/ckeditor5-highlight": "^11.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/fontfamily/fontfamilyediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default class FontFamilyEditing extends Plugin {

// Allow fontFamily attribute on text nodes.
editor.model.schema.extend( '$text', { allowAttributes: FONT_FAMILY } );
editor.model.schema.setAttributeProperties( FONT_FAMILY, { isFormatting: true } );

// Get configured font family options without "default" option.
const options = normalizeOptions( editor.config.get( 'fontFamily.options' ) ).filter( item => item.model );
Expand Down
1 change: 1 addition & 0 deletions src/fontsize/fontsizeediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ export default class FontSizeEditing extends Plugin {

// Allow fontSize attribute on text nodes.
editor.model.schema.extend( '$text', { allowAttributes: FONT_SIZE } );
editor.model.schema.setAttributeProperties( FONT_SIZE, { isFormatting: true } );
}
}
6 changes: 6 additions & 0 deletions tests/fontfamily/fontfamilyediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ describe( 'FontFamilyEditing', () => {
expect( editor.model.schema.checkAttribute( [ '$block' ], 'fontFamily' ) ).to.be.false;
} );

it( 'should be marked with a formatting property', () => {
expect( editor.model.schema.getAttributeProperties( 'fontFamily' ) ).to.deep.equal( {
isFormatting: true
} );
} );

describe( 'config', () => {
describe( 'default value', () => {
it( 'should be set', () => {
Expand Down
6 changes: 6 additions & 0 deletions tests/fontsize/fontsizeediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ describe( 'FontSizeEditing', () => {
expect( editor.model.schema.checkAttribute( [ '$block' ], 'fontSize' ) ).to.be.false;
} );

it( 'should be marked with a formatting property', () => {
expect( editor.model.schema.getAttributeProperties( 'fontSize' ) ).to.deep.equal( {
isFormatting: true
} );
} );

describe( 'config', () => {
describe( 'default value', () => {
it( 'should be set', () => {
Expand Down

0 comments on commit e153ead

Please sign in to comment.