8
0
Просмотр исходного кода

Added a note about "disableValueMatching" option for FontFamily and FontSize plugins.

Kamil Piechaczek 5 лет назад
Родитель
Сommit
e921bb16a6
1 измененных файлов с 38 добавлено и 0 удалено
  1. 38 0
      packages/ckeditor5-font/docs/features/font.md

+ 38 - 0
packages/ckeditor5-font/docs/features/font.md

@@ -47,6 +47,25 @@ ClassicEditor
 
 {@snippet features/custom-font-family-options}
 
+### Prevent removing non-specified values
+
+By default, all not specified values of `font-family` are removing during the conversion. You can disable this behaviour using `disableValueMatching` option.
+
+```js
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		fontFamily: {
+			options: [
+				// ...
+			],
+            disableValueMatching: true
+		},
+        // ...
+	} )
+	.then( ... )
+	.catch( ... );
+```
+
 ## Configuring the font size feature
 
 It is possible to configure which font size options are supported by the WYSIWYG editor. Use the {@link module:font/fontsize~FontSizeConfig#options `fontSize.options`} configuration option to do so.
@@ -150,6 +169,25 @@ ClassicEditor
 
 {@snippet features/custom-font-size-numeric-options}
 
+### Prevent removing non-specified values
+
+By default, all not specified values of `font-size` are removing during the conversion. You can disable this behaviour using `disableValueMatching` option.
+
+```js
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		fontSize: {
+			options: [
+				// ...
+			],
+			disableValueMatching: true
+		},
+        // ...
+	} )
+	.then( ... )
+	.catch( ... );
+```
+
 ## Configuring the font color and font background color features
 
 Both font color and font background color features are configurable and share the same configuration format.