software-mansion / software-mansion/react-native-enriched-html

[Feature request] possibility to iterate styled blocks in the current selection

Open
#263 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.