Files
ladybird/Tests/LibWeb/Text/expected/Editing/execCommand-insertLinebreak.txt
Jelle Raaijmakers da01b0c389 LibWeb: Insert newlines for line breaks in preformatted white-space
When inserting a line break in a contenteditable with preformatted
white-space (pre, pre-line, pre-wrap), insert a newline character (\n)
instead of a <br> element. Use <br> only for padding at end of line to
ensure the cursor can be placed on the new line.
2026-01-23 14:21:35 +01:00

11 lines
272 B
Plaintext

Before: "foobar"
After: "foo<br>bar"
Before: "<p style="white-space: pre">foobar</p>"
After: "<p style="white-space: pre">foo
bar</p>"
Before: "<p style="white-space: pre">foobar</p>"
After: "<p style="white-space: pre">foobar
<br></p>"
Before: "foo"
After: "foo<br><br>"