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):
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):