Inserts content represented by HTML snippet into editor at a given index. The snippet is interpreted by Clipboard matchers, which may not produce the exactly input HTML. If no insertion index is provided, the entire editor contents will be overwritten. The source may be "user"
, "api"
, or "silent"
.
Improper handling of HTML can lead to cross site scripting (XSS) and failure to sanitize properly is both notoriously error-prone and a leading cause of web vulnerabilities. This method follows React’s example and is aptly named to ensure the developer has taken the necessary precautions.
Small business tips
Adversity is nothing new for most business owners. But there's a difference between running a business and running a business during an economic downturn.
By Wade Foster
.6 min read
We’ll email you 1-3 times per week—and never share your information.