disable background color of text when copy pasting
Anyone know how to disable text background color when copy pasting ?
9 Replies
As you can see when i copy pasted text background color is included in that field
Is it pasting it within spans? And if so I'm presuming inline styling is being added.
Just wait for the event and grab the clipboard, grab the inner contents of the html and put it into a clean span
No, its just a div. i couldnt replicate it in code pen. thisis how i used
Ah I'm not sure about content editable stuff sorry.
I'm sure that you'd still be able to listen for the event and then copy the inner text placing within a div
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
if i implement ::section{background-color:transparent} then the user visualize the selection i dont want that.
the only issue is when user copy paste text from various sources, its also copying the background color of the container which the text is placed
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
im selection
i used this worked like a charm
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View