KazariEX / plain-shiki

Highlight your plaintext via Shiki.
https://shiki.bikari.top
MIT License
54 stars 0 forks source link

Incorrect paste behavior, paste causes highlight failure and style errors #5

Open Innei opened 6 days ago

Innei commented 6 days ago

Since this is a contentable element, there is no processing when pasting rich text, and it should only paste plain text.

https://github.com/user-attachments/assets/97803753-69f4-4b8f-b79c-b37bb4667b7c

KazariEX commented 6 days ago

The original intention of doing this is to make some rich text in the code work well, because not all browsers support contenteditable="plaintext-only". I'm not sure if manually support this will introduce too much rich text processing code into the library.