[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.RemoveStyle

RemoveStyle Method

RemoveStyle(string, string)

Removes the specified inline style.

Declaration
public void RemoveStyle(string propertyName, string propertyValue)
Parameters
Type Name Description
string propertyName

Name of the inline style.

string propertyValue

CSS value of the inline style.

Remarks

If propertyValue is null, the function removes specified inline style with any value.

Examples

This example removes specified color from the selected text. If the value is null it applies default color to the text.

function SetColor(Color value)
{
if (value.IsEmpty)
_editor.Selection.RemoveStyle("color", null);
else
{
string foreColor = System.Drawing.ColorTranslator.ToHtml(value);
_editor.Selection.ApplyStyle("color", foreColor, C1StyleType.Character);
}
}