JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.66k stars 307 forks source link

Error in entering text in the editor #1415

Open ilcary opened 1 week ago

ilcary commented 1 week ago

Describe the bug When inserting text into the editor, it automatically wraps the text in <p> tags instead of maintaining inline formatting.

To Reproduce Steps to reproduce the behavior:

Go to [SunEditor Sample Options Page](http://suneditor.com/sample/html/options.html)
Keep all default options as they are.
Focus on the input area and delete all content (Ctrl + A then BACKSPACE) until the format selector shows 'Paragraph'.
Try to insert some text. You will observe the text being wrapped in <p> tags automatically.

Screenshots

Before inserting text:

image
image

After inserting text:

image

Video A demonstration of the issue 📹

Expected behavior The text should remain inline until it is manually wrapped in a block element.

Desktop:

OS: Windows
Browser: Firefox
Version: 127.0.2 (64-bit)
Kryostatic94 commented 1 week ago

I got this problem too...