Răsfoiți Sursa

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

Kamil Piechaczek 5 ani în urmă
părinte
comite
e921bb16a6
1 a modificat fișierele cu 38 adăugiri și 0 ștergeri
  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}
 {@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
 ## 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.
 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}
 {@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
 ## 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.
 Both font color and font background color features are configurable and share the same configuration format.