javascript - How to clear tags and styles of text pasted into editable (contenteditable) elements?
黄舟
黄舟 2017-06-30 09:53:13
0
2
854

When copying text from other places, even the styles are copied. How to clear the original tags and styles?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
三叔

Open Notepad, paste, then select all, cut, and then copy.

黄舟

Reference: https://stackoverflow.com/que...
Example: (may not open)
http://jsfiddle.net/ch6yn/

The following is an example I wrote myself:

<p id="editArea" contenteditable oninput="this.innerHTML = this.innerText">
</p>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template