fleather icon indicating copy to clipboard operation
fleather copied to clipboard

[Feat] Add a remove formatting action to remove any attribute/attributes from selected text

Open Lomedhi opened this issue 8 months ago • 0 comments

Is your feature request related to a problem? Please describe. With a controller.document.format(); you are able to add an attribute to a specified index and length of characters , but are not able to remove attributes from specified text.

Even if you implement an undo function action that undoes the format, the Delta undo doesn’t catch the attribute change to undo and needs another document change in order to undo both the document change and the .format(); attribute addition.

Describe the solution you'd like Ex. controller.document.removeAttributes(index, length, [ParchmentAttribute.bold]);

Describe alternatives you've considered Attempted to use replace function to text with all the attributes after removing the attribute you wanted to remove, but it requires a textSelection.

Additional context

Lomedhi avatar Apr 28 '25 18:04 Lomedhi