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

[Feature request] Support for JSON format in content import/export and HTML <-> JSON conversion

Open
#649 1 comment 4 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

Hi there! Thanks for the great work on this library.

Currently, react-native-enriched-html only supports HTML string format for content import and export. While there is nothing inherently wrong with this, it can create challenges when storing data in server-side databases, as storing raw HTML strings is generally not considered a best practice. Other web-based editors handle this by providing JSON format support, allowing users to seamlessly import and export their content as JSON.

The main benefits of adding JSON support include:

Easier and safer database storage: It aligns much better with backend best practices.
Simplified backend validation: JSON is much easier to iterate over and validate to ensure the correctness of the state.
It would be amazing if you could consider adding JSON import/export capabilities, along with some utility functions to easily convert HTML to JSON and JSON to HTML.

For reference, here is an example of how this is solved in another web editor:

https://tiptap.dev/docs/guides/output-json-html
https://tiptap.dev/docs/editor/api/utilities/html

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

The issue names no files, tests, or entry points. Start by tracing the library's existing HTML import/export API and reviewing the linked Tiptap JSON and HTML conversion examples; done means the requested JSON import/export and HTML↔JSON conversion behavior is clearly defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, json, react-native
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.