Set line spacing of the paragraph in which the caret is positioned.
When there is a selection, line spacing of the selected paragraphs is set.
Parameters:
| Name | Type | Description |
|---|---|---|
| actionName | String | 'setLineHeight' line spacing API |
| lineHeight | Object | { value: {Number}, unit: {String} } |
Example:
editor.execCommand('setLineHeight', { value: 1.6, unit: '' }); // line height 1.6
editor.execCommand('setLineHeight', { value: 150, unit: '%' }); // line height 150%
editor.execCommand('setLineHeight', { value: 20, unit: 'px' }); // line height 20px