xdan / jodit

Jodit - Best WYSIWYG Editor for You
https://xdsoft.net/jodit/
MIT License
1.61k stars 341 forks source link

Selection by triple click removes close tag + open tag of next paragraph #1101

Closed ZimnitskiYury closed 2 months ago

ZimnitskiYury commented 3 months ago

Jodit Version: 4.0.18

Browser: Chrome/IE/Safary/FF OS: Windows/Mac/Linux Is React App: True

Code:

  1. in source mode paste this HTML
    <p style="font-size: 16.5pt; margin: 0">Body Subtitle</p>
    <p style="font-size: 10pt; line-height: normal; margin: 7px 0 0 0;">To modify this template, place it into your Outlook editor.</p>
  2. change mode back
  3. select Body Subtitle byt triple click
  4. delete selection

Expected behavior: paragraph <p style="font-size: 10pt; line-height: normal; margin: 7px 0 0 0;">To modify this template, place it into your Outlook editor.</p> saves own styles. paragraph Body Subtitle will be removed properly

Actual behavior: after all steps I get this result:

<p style="font-size: 16.5pt; margin: 0">To modify this template, place it into your Outlook editor.</p>

reproducible on jodit playground