Pasting

Has anybody noticed that pasting is sorta like pasta?

— Anonymous

Definition

Pasting is when the user attempts to insert content into their rich text editor with Ctrl/Cmd + V or when code attempts to insert content via document.execCommand('paste').

Read more on MDN

What this means for you

Bandicoot by default will allow for any and all pasting. If you wish to customize which pastes are allowed, you can provide the pasteFn prop.

Note that pasted html is vulnerable to cross site scripting (XSS) and so you should also provide the sanitizeHTML prop to RichTextEditor to sanitize the HTML. See sanitization docs for more information.

results matching ""

    No results matching ""