Apply the text style to the selected text.
Merge the style received as an object to the existing style.
Parameters:
Name | Type | Description |
---|---|---|
actionName | String | 'addRunStyle' text style adding API |
style | Object | Style object to apply |
Example:
editor.execCommand('addRunStyle', { fontSize: {value: 20, unit: 'pt'} }); // Add font size editor.execCommand('addRunStyle', { color: {r: 255, g: 0, b: 0} }); // Add font color editor.execCommand('addRunStyle', { backgroundColor: {r: 0, g: 0, b: 255} }); // Add font background color