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

htmlToDraft adds extra space to text node #104

Open
ezheniko opened this issue Jun 15, 2021 · 0 comments
Open

htmlToDraft adds extra space to text node #104

ezheniko opened this issue Jun 15, 2021 · 0 comments

Comments

@ezheniko
Copy link

console.log(html);
const contentBlock = htmlToDraft(html);
contentBlock.contentBlocks.forEach(i => console.log(i.toJS()));

first console.log prints this

<ul> 
 <li>sdf</li> 
</ul>

console.log for contentBlock prints this

characterList: (4) [{…}, {…}, {…}, {…}]
data: {}
depth: 0
key: "8fh3d"
text: "sdf "
type: "unordered-list-item"

as you see it adds extra space to text inside <li>

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