jpuri / jpuri/draftjs-to-html

End of content is excluded from most recent changes

Open
#23 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
325
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Thank you @jpuri for all your work here.

In using your editor and changing to html, I noticed that part of the stylings is not being applied to all the content. I even tried it in storybook mode and was able to reproduce the error.

It appears that when an emoji is inserted, it will leave off the final character from the applied stylings.

For example:

🤔 What's wrong with lines with emojis?
becomes
<p>🤔 What's wrong with lines with<strong> emojis</strong>?</p>

The question mark was excluded from the bold styling

and
😁😀 double trouble
becomes
<p><strong>😁😀 double troub</strong>le</p>

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

Reproduce the emoji examples in Storybook, comparing the reported Draft.js content with the generated HTML. Trace the conversion path responsible for styling ranges and verify the fix against both examples. Done means the final question mark and the ending of “double trouble” remain inside the expected strong element.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.