Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content disappear with existing list #59

Open
sammiwei911 opened this issue Jan 10, 2020 · 0 comments
Open

Content disappear with existing list #59

sammiwei911 opened this issue Jan 10, 2020 · 0 comments

Comments

@sammiwei911
Copy link

sammiwei911 commented Jan 10, 2020

Version: "^0.2.5"
We have recently adopted this lib for our editor. Here is the sample code that we have previously generated using default list

<ul><li><span><strong>A: </strong></span><span>content A</span></li><li><span><strong>B: </strong></span><span>content B</span></li><li><span><strong>C: </strong></span><span>Content C</span></li><li><span><strong>D: </strong></span><span>Content D</span></li></ul>

After the rendering with this plugin, some of the content were lost, the html becomes

<ul class="unordered-list" data-key="25"><li class="list-item" data-key="26"><div class="list-item-child" data-key="69"><span data-key="27"><span data-slate-leaf="true" data-offset-key="27:0"><span><strong><span data-slate-content="true">A: </span></strong></span></span></span></div></li><li class="list-item" data-key="29"><div class="list-item-child" data-key="68"><span data-key="30"><span data-slate-leaf="true" data-offset-key="30:0"><span><strong><span data-slate-content="true">B: </span></strong></span></span></span></div></li><li class="list-item" data-key="32"><div class="list-item-child" data-key="67"><span data-key="33"><span data-slate-leaf="true" data-offset-key="33:0"><span><strong><span data-slate-content="true">C: </span></strong></span></span></span></div></li><li class="list-item" data-key="35"><div class="list-item-child" data-key="66"><span data-key="36"><span data-slate-leaf="true" data-offset-key="36:0"><span><strong><span data-slate-content="true">D: </span></strong></span></span></span></div></li></ul>

All the Contents span are gone as show in screenshot:
Screen_Shot_2020-01-10_at_3_28_32_PM

If we add a div to each li element, it seems to be working. Below is an example:

<ul><li><div><span><strong>A: </strong></span><span>Content A</span></div></li><li><div><span><strong>B: </strong></span><span>Content B</span></div></li><li><div><span><strong>C: </strong></span><span>Content C</span></div></li><li><div><span><strong>D: </strong></span><span>Content D</span></div></li></ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant