[]
Returns a value indicating whether the specified CSS class is applied to the C1TextRange.
public bool IsClassApplied(string className)
Type | Name | Description |
---|---|---|
string | className | The CSS class name to check. |
Type | Description |
---|---|
bool | True, if the CSS class is applied to the range; otherwise, False. |
This example updates some UI controls depending on the style of the selected text.
function UpdateUI()
{
if (_editor.Mode == EditorMode.Design)
{
_button1.Enabled = _editor.Selection.IsClassApplied("topic");
_button2.Enabled = _editor.Selection.IsClassApplied("book");
}
}