software-mansion / software-mansion/react-native-enriched-html
[Feature request] possibility to iterate styled blocks in the current selection
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 66
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
I am trying to implement a "clear formatting" toolbar button. Any text selection may have several different stylings applied throughout the selection. The enriched APIs are limited to simple on and off states as it applies to each style, which cannot accommodate clearing all styling.
Describe the solution you'd like
Most rich text editors, including MDXEditor, which we are using for the web, have APIs for iterating through nodes/styled blocks within the selection. This makes it quite simple to clear the formatting on each node.
Describe alternatives you've considered
The only option at the moment appears to be manually manipulating the HTML, which is not a reasonable option unfortunately.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing enriched APIs for style state handling and how the current selection is represented. Define an API that exposes nodes or styled blocks within a selection, then verify that callers can use it to clear formatting across mixed styles without manually manipulating HTML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100