DevExtreme jQuery/JS - Format the Content

The HtmlEditor provides the following API methods to format the content:

API Method Description
format(formatName, formatValue) Applies a format to the selected content.
formatLine(index, length, formatName, formatValue) Applies a single block format to all lines in the given range.
formatLine(index, length, formats) Applies several block formats to all lines in the given range.
formatText(index, length, formatName, formatValue) Applies a single text format to all characters in the given range.
formatText(index, length, formats) Applies several text formats to all characters in the given range.

Refer to the full method descriptions for examples and detailed information.