Looking at the function UltraFormattedTextEditor.EditInfo.GetCurrentStyle() I'm wondering if there's any way to do the opposite -> SetCurrentStyle?
My goal is to clear a certain style from the current state style. Toggling bold on/off by using the UltraFormattedTextEditor.PerformAction() doesn't work as it only sets the current state style to font-weight:bold or font-weight:normal. I want it completely cleared.
Using UltraFormattedTextEditor.EditInfo.ClearStyleAttributes() works for this when text is selected but I want to change the current state style for the caret meaning it will be applied for the next typed char.
Hi,
I think you are looking for the ApplyStyle method.
ApplyStyle lets you set a style but I want to end a current style. For example I want to remove the bold style. I can do this by ApplyStyle font-weigth:normal but then the text will have a forced style of normal. I want to remove this style so that no font-weigth is specified for the remainder of the text.
Example:
123456789
1. Type "123"
2. ApplyStyle( "font-weight:bold" )
3. Type "456"
4. Clear style "font-weight" without having to specify a new fontweight style of "font-weight:normal". I want default.
5. Type "789"