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

Using insertHTML causes the current paragraph to be closed and the string inserted on a new line #1460

Open
piercecl79 opened this issue Nov 4, 2024 · 0 comments

Comments

@piercecl79
Copy link

Describe the bug
I have added a merge field to the toolbar that will insert a string that is wrapped in a span tag. When I use the insert it enters the insert element on the next line. Looking at the source code it closes the P tag of the line your on and inserts the element on a new line.

To Reproduce
I went to suneditor.com and went down to user functions where I could test the insertHTML function. If you enter "hello world" and then click the insertHTML button you will notice the element was entered on the next line. If you view the source code you can see where hello world has an opening and closing P tag.

Expected behavior
my understanding is that it should insert the element or string without modifying any of the prepended content. I would expect the merge field to be inserted directly after "world" in this case.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser - Chrome
  • Version - v2.47.0
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