Copy-paste does not preserve formatting (Firefox MacOS)
Hello,
Thank you again for this great application!
I've noticed what seems to be a new bug: on Firefox (apparently only on Mac), copy-pasting does not preserve formatting.
To reproduce: on this page, if you copy the text from an example and paste it back in the same place, the formatting is lost.
https://medv.io/codejar/
It's probably related to this:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/136 The plaintext-only value of the contenteditable global attribute indicates that the element is editable; rich text formatting is disabled and any formatting in pasted text is automatically stripped (Firefox bug 1922724).
Yea) I'm not interested in fixing FF bugs (as it is too many to), but will be happy to merge a PR with a fix.
Seems to work : https://github.com/antonmedv/codejar/pull/126
@eyssette Would you mind verifying whether my changes in #118 resolve this? I don’t have Firefox 136 to test it, unfortunately, but I fixed some issues related to Firefox.
I tested it. Your improvements helped, but after pressing Enter, the cursor was still on the old line, but then continued writing on the new one. The fix was therefore necessary after all.