Div contenteditable, when gluing the content, you can remove the tags containing HTML, leaving only the text?

subject
div the contenteditable function can be copied into or accepted by HTML. If I copy an article from SF to this div, the original HTML tag of SF will be copied.

Code

<div contenteditable=true"></div>

question

  1. does not know js , jquery what function can be implemented: if my copied content contains the HTML tag, then automatically clear its tag, leaving only the text?
  2. there are < iframe src*=instagram (or < iframe > ) headers in the content of the HTML tag, and the other HTML header tag is emptied, leaving only the text, and then added to div ?

using js clipboard api regular replacement


contenteditable=" plaintext-only "

Menu