[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.IsClassApplied

IsClassApplied Method

IsClassApplied(string)

Returns a value indicating whether the specified CSS class is applied to the C1TextRange.

Declaration
public bool IsClassApplied(string className)
Parameters
Type Name Description
string className

The CSS class name to check.

Returns
Type Description
bool

True, if the CSS class is applied to the range; otherwise, False.

Examples

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");
} }