LineHeightConfig
The configuration of the LineHeight feature.
Read more in LineHeightConfig.
Properties
-
defaultValue : number | undefinedmodule:line-height/lineheightconfig~LineHeightConfig#defaultValueDefault value of line height attribute. Defaults to
1.5. -
options : Array<string | number | LineHeightOption> | undefinedmodule:line-height/lineheightconfig~LineHeightConfig#optionsAvailable line height options. The default value is:
const lineHeightConfig = { options: [ 0.5, 1, 1.5, 2, 2.5 ] };Copy codeNote: Line height values have to be provided in a format without units. The available values are always multipliers of the default line height applied to the edited content.
-
supportAllValues : boolean | undefinedmodule:line-height/lineheightconfig~LineHeightConfig#supportAllValuesBy default, the plugin removes any
line-heightvalue that does not match the plugin's configuration. It means that if you paste content with line heights that the editor does not understand, theline-heightattribute will be removed and the content will be displayed with the default line height.You can preserve pasted line heights values by switching the
supportAllValuesoption totrue:const lineHeightConfig = { supportAllValues: true };Copy codeWith this configuration line heights not specified in the editor configuration will not be removed when pasting the content.