# Strip HTML on Paste

This help article shows how to strip HTML tags from content that is pasted in **RadEditor**.

Follow these steps:

1. Handle the [OnClientPasteHtml event](https://www.telerik.com/products/aspnet-ajax/documentation/controls/editor/client-side-programming/events/onclientpastehtml).
2. Catch the **Paste** command.
3. Obtain the content via the `get_value()` method of the event arguments and modify it as needed.
4. Set the modified content via the `set_value()` method of the event arguments.

> caption Example 1: Stripping `<strong>`, `<em>` and `<span>` tags on paste in **RadEditor**.

```ASP.NET
<telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" OnClientPasteHtml="OnClientPasteHtml" />

<script>
    function OnClientPasteHtml(editor, args) {
        var commandName = args.get_commandName();

        // Paste command is the one that handles plain paste, e.g., when Ctrl+V is used.
        if (commandName === "Paste") {
            var htmlToBePasted = args.get_value(); // Get the value to be pasted
            
            // Use Regex to strip <strong>, <em> and <span> tags.
            htmlToBePasted = htmlToBePasted.replace(/<(\/)*(strong|em|span)[^>]*>/gi, "");

            // Set the processed content to the arguments.
            args.set_value(htmlToBePasted);
        }
    }
</script>
```

## See Also

* [OnClientPasteHtml event](https://www.telerik.com/products/aspnet-ajax/documentation/controls/editor/client-side-programming/events/onclientpastehtml)
