docs: Rich text formatting section#713
Open
hejsztynx wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Rich text formatting” documentation section to the Docusaurus docs, introducing core formatting features of react-native-enriched-html with interactive editor examples.
Changes:
- Adds new interactive example components for basic styles, links, mentions, lists, inline images, text alignment, and text shortcuts.
- Replaces placeholder
.mdpages with full.mdxpages that embed the interactive examples. - Documents key API concepts for each feature (props/events/ref methods) with runnable snippets.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/examples/BasicStylesEditor.tsx | Adds interactive toolbar example for inline + paragraph style toggles. |
| docs/src/examples/LinksEditor.tsx | Adds example showing autolink via linkRegex and manual linking via setLink. |
| docs/src/examples/MentionEditor.tsx | Adds minimal mention insertion example using setMention. |
| docs/src/examples/ListsEditor.tsx | Adds list toggling example (unordered/ordered/checkbox) driven by onChangeState. |
| docs/src/examples/ImagesEditor.tsx | Adds inline image insertion example using setImage. |
| docs/src/examples/TextAlignmentEditor.tsx | Adds alignment buttons example using setTextAlignment and state.alignment. |
| docs/src/examples/TextShortcutsEditor.tsx | Adds example configuring textShortcuts for paragraph + inline shortcuts. |
| docs/docs/rich-text-formatting/basic-styles.mdx | New “Basic styles” page describing inline vs paragraph styles with embedded example. |
| docs/docs/rich-text-formatting/basic-styles.md | Removes placeholder TODO page (replaced by .mdx). |
| docs/docs/rich-text-formatting/links.mdx | New “Links” page covering autolinks vs manual links with embedded example. |
| docs/docs/rich-text-formatting/links.md | Removes placeholder TODO page (replaced by .mdx). |
| docs/docs/rich-text-formatting/mentions.mdx | New “Mentions” page covering indicators, setMention, and mention events. |
| docs/docs/rich-text-formatting/mentions.md | Removes placeholder TODO page (replaced by .mdx). |
| docs/docs/rich-text-formatting/lists.mdx | New “Lists” page describing list toggles and behavior with embedded example. |
| docs/docs/rich-text-formatting/lists.md | Removes placeholder TODO page (replaced by .mdx). |
| docs/docs/rich-text-formatting/inline-images.mdx | New “Inline images” page describing setImage and failure behavior with example. |
| docs/docs/rich-text-formatting/inline-images.md | Removes placeholder TODO page (replaced by .mdx). |
| docs/docs/rich-text-formatting/text-alignment.mdx | New “Text alignment” page describing setTextAlignment + state reporting. |
| docs/docs/rich-text-formatting/text-alignment.md | Removes placeholder TODO page (replaced by .mdx). |
| docs/docs/rich-text-formatting/text-shortcuts.mdx | New “Text shortcuts” page explaining paragraph vs inline shortcuts and defaults. |
| docs/docs/rich-text-formatting/text-shortcuts.md | Removes placeholder TODO page (replaced by .mdx). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (3)
docs/docs/rich-text-formatting/text-shortcuts.mdx:12
- The prose says typing
#turns a line into a heading, but your configured trigger is'# '(hash + space). Using#without the trailing space is misleading for readers trying the feature.
Text shortcuts let users format as they type, the way Markdown editors do -
typing `#` turns a line into a heading, wrapping a word in `**` makes it bold.
docs/docs/rich-text-formatting/text-shortcuts.mdx:38
- Paragraph shortcut examples should include the trailing spaces required by the actual triggers (e.g.
#,-,1.). Otherwise readers may try the prefix without a space and think shortcuts are broken.
e.g. `#` for a heading, `-` for a bulleted list. Since a paragraph can only hold
docs/docs/rich-text-formatting/text-shortcuts.mdx:72
- In the "Try it out" section, the paragraph shortcut is described as
#but the example/editor uses the'# 'trigger. Updating this makes the instructions match the actual behavior.
The editor below wires up one shortcut of each kind - a paragraph one (`#` → H1)
and an inline one (`**` → bold). Start a line with `#` and watch it become a
heading, then wrap a word in `**stars**` to bold it.
…s-rich-text-formatting
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
hejsztynx
force-pushed
the
@ksienkiewicz/docs-rich-text-formatting
branch
from
July 20, 2026 13:10
24db158 to
942497f
Compare
| list type. Notice how switching from **Bulleted** to **Numbered** swaps the style | ||
| instead of stacking. Inserting a new line preserves the list format by creating another item, and tapping a checkbox toggles just that item. | ||
|
|
||
| <InteractiveExample src={ListsEditorSrc} component={ListsEditor} /> |
Collaborator
Co-authored-by: Kacper Żółkiewski <74975508+kacperzolkiewski@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Rich text formattingsection with: