pasteHtml | RadEditor for ASP.NET AJAX Documentation
Edit this page


Pastes HTML content to the cursor position.

function pasteHtml(content)
content string The HTML content, that will be pasted in Telerik RadEditor

The following example will show you how to paste content into the editor's content area from an external input button:

<telerik:radeditor runat="server" ID="RadEditor1"></telerik:radeditor>
<input type="button" value="Paste Content" onclick="InsertSpan();return false;" />
<script type="text/javascript">
    function InsertSpan()
        var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to the editor
        editor.pasteHtml('<span style="width:100px;border: 1px solid red;background-color: blue;color: white;">sample content</span>');
Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article