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

setContents without html tag will cause crash when editing #1201

Closed
cub opened this issue Mar 30, 2023 · 1 comment
Closed

setContents without html tag will cause crash when editing #1201

cub opened this issue Mar 30, 2023 · 1 comment
Labels
Milestone

Comments

@cub
Copy link

cub commented Mar 30, 2023

Describe the bug
Init a wysiwyg and then set some contents without html tag like this editor.setContents('Try to edit me, set me bold, add new line, ... Crash x_x');.
Then try setting a style to the existing text or add a new line. This causes an error:
Cannot read properties of undefined (reading 'textContent') (style like bold)
or
Failed to execute 'createElement' on 'Document': The tag name provided ('#text') is not a valid name. (new line)

In version 2.44.3 no problem. Since 2.44.4 it crashes.

To Reproduce
https://stackblitz.com/edit/js-w6byqc?file=index.js

@JiHong88 JiHong88 added the bug label Mar 31, 2023
@JiHong88 JiHong88 added this to the 2.44.6 milestone Mar 31, 2023
@JiHong88
Copy link
Owner

The 2.44.6 version has been updated.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants