浏览代码

Merge branch 'master' into t/ckeditor5/1457

Marek Lewandowski 6 年之前
父节点
当前提交
f800319ad3

+ 0 - 1
packages/ckeditor5-font/package.json

@@ -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",

+ 1 - 0
packages/ckeditor5-font/src/fontfamily/fontfamilyediting.js

@@ -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 );

+ 1 - 0
packages/ckeditor5-font/src/fontsize/fontsizeediting.js

@@ -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 - 0
packages/ckeditor5-font/tests/fontfamily/fontfamilyediting.js

@@ -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', () => {

+ 6 - 0
packages/ckeditor5-font/tests/fontsize/fontsizeediting.js

@@ -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', () => {