React-draft-wysiwyg: emoji add fontSize draftToHtml � why?

Created on 13 Jul 2017  ·  6Comments  ·  Source: jpuri/react-draft-wysiwyg

example:

😫

add fontSize

output

Most helpful comment

Sorry, if it's bad form to reply to closed issues, but I had a very similar problem and can add more information...

I noticed the same thing when we had an emoji and made it larger, once converted from draft to html, it would be a: <span style="font-size:48px;">�</span>�</p>

I feel like I saw somewhere when going thru different libraries and files, that when a selection is modified its length is taken into account, however i think with the addition of an emoji character the length is not properly accounted for...

Examp: if you make the text "asdf 😍 asdf"
and then make that all 72px tall, you end up with everything 72px except the last 'f':
<p><span style="font-size:72px;">asdf 😍 asd</span>f</p>

Hopefully this helps, thanks for a great library.

All 6 comments

Hi @Pillar-Zhang : since it works here: https://jpuri.github.io/react-draft-wysiwyg/#/demo

It looks to me like encoding of your page is not supporting unicodes correctly.

Any luck with the issue, this does not appears to be issue with the editor. Should I go ahead to close this ?

ok

Sorry, if it's bad form to reply to closed issues, but I had a very similar problem and can add more information...

I noticed the same thing when we had an emoji and made it larger, once converted from draft to html, it would be a: <span style="font-size:48px;">�</span>�</p>

I feel like I saw somewhere when going thru different libraries and files, that when a selection is modified its length is taken into account, however i think with the addition of an emoji character the length is not properly accounted for...

Examp: if you make the text "asdf 😍 asdf"
and then make that all 72px tall, you end up with everything 72px except the last 'f':
<p><span style="font-size:72px;">asdf 😍 asd</span>f</p>

Hopefully this helps, thanks for a great library.

Doesn't work on demo page either, look at HTML, there are weird ��.

screen shot 2018-06-28 at 12 09 06

same problem.
does anyone find any solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fireprufe15 picture Fireprufe15  ·  4Comments

jpuri picture jpuri  ·  4Comments

Leadrive picture Leadrive  ·  3Comments

kcabading picture kcabading  ·  3Comments

dahudson88 picture dahudson88  ·  3Comments