You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser: Chrome, Edge, Safari, FF OS: Windows, Mac, Linux Is React App: False
Code
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore<br><br>magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd<br><br>gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing<br><br>elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eo<br><br></p>
put the html text from above into a html file and open it, then copy the text
remove all predefined content from the editor strg + a -> entf
strg + v -> insert only text
Expected behavior:
The new lines "br" should be respected and the text should look like this.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eo
Actual behavior:
processHTML -> insertByType -> striptags removes the line breaks.
What leads to this behavior?
insertByType calls striptags without the exclude parameter, as result the line breaks are getting removed.
Jodit Version: 3.24.5 & 4.0.0-beta.94
Browser: Chrome, Edge, Safari, FF
OS: Windows, Mac, Linux
Is React App: False
Code
Expected behavior:
The new lines "br" should be respected and the text should look like this.
Actual behavior:
processHTML -> insertByType -> striptags removes the line breaks.
What leads to this behavior?
insertByType calls striptags without the exclude parameter, as result the line breaks are getting removed.
https://github.com/xdan/jodit/blob/main/src/plugins/paste/paste.ts#L160
For test purposes, I have added the following.
I then tried the insert only text again and it worked mostly as I would expect it.
It inserts one additional line break instead of the two defined.
My expectation was like that, that when clicking on insert text only, the behavior of CTRL + Shift + v would be mimicked.
The text was updated successfully, but these errors were encountered: