[]
Removes the specified inline style.
public void RemoveStyle(string propertyName, string propertyValue)
Type | Name | Description |
---|---|---|
string | propertyName | Name of the inline style. |
string | propertyValue | CSS value of the inline style. |
If propertyValue
is null, the function removes specified inline style with any value.
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);
}
}