Answer the question
In order to leave comments, you need to log in
How to insert clear text into a block with contenteditable?
There is such a bug/feature in webkit that when copying text, the style of this text is also copied somewhere. This is clearly seen in the example .
If you are currently in chrome or another browser with webkit, copy Lorem ipsum into the top box. Then you will notice that the text style has been transferred to the field.
If the copied text in chrome is pasted into this field only from Mozilla, then the result will be the same.
If you copy the text in Mozilla and paste it into this field from any browser, then the text will be without style.
Of course, you can make a hack so that this is not visible:
.t * {
//тот же стиль текста что и в поле
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question