hubgit / react-prosemirror

A React component for ProseMirror
https://ow1qi.csb.app/
MIT License
248 stars 51 forks source link

Strange op with underline. #10

Closed ghost closed 6 years ago

ghost commented 6 years ago

Dear @hubgit you work is amazing! Thanks a lot!

I'm using this editor in my React app.

But I have this strange operation:

when I write a phrase I use the underline menu button.

If I inspect the editor value I can see this:

Some normal text and <span style="text-decoration: underline;">some words in underline</span>.</p>.

But if I re-open the editor with ... value={propText} saved before it doesn't recognize anymore the underline in editor:

image

<p>Some normal text and <span style="text-decoration: underline;">some words in underline</span>.</p>

image

<p>Some normal text and <span style="text-decoration: underline;">some words in underline</span>.</p>

The prop code value is the same as you can see.

Where is the problem?

hubgit commented 6 years ago

Fixed in https://github.com/hubgit/react-prosemirror/pull/17