Page tree
Skip to end of metadata
Go to start of metadata

Apply the text style to the selected text.

Merge the style received as an object to the existing style.


Parameters:

NameTypeDescription
actionNameString'addRunStyle' text style adding API
styleObjectStyle 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
  • No labels