[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.IsTagApplied

IsTagApplied Method

IsTagApplied(string)

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

Declaration
public bool IsTagApplied(string tagName)
Parameters
Type Name Description
string tagName

The tag name.

Returns
Type Description
bool

True, if the specified tag is applied to the current range; otherwise, False.

Examples

The code updates an application UI. It marks an "Ordered list" button as checked if an ordered list is selected. It marks an "Unordered list" button as checked if an unordered list is selected.

btnOrderedList.Checked = _editor.Selection.IsTagApplied("ol");
btnUnorderedList.Checked = _editor.Selection.IsTagApplied("ul");