
Untitled
By: a guest on
May 8th, 2012 | syntax:
None | size: 0.78 KB | hits: 15 | expires: Never
how to set the content to radeditor using javascript
var content = window.clipboardData.getData("Text");
if (content != null) {
editor.set_html = content;
var newValue = "control alt delete";
$find("<%=RadEditor1.ClientID%>").set_html(newValue);
var editor = $find("<%=RadEditor1.ClientID%>");
var content = window.clipboardData.getData("Text");
if (content != null) {
editor.set_html = content;
var editor = $find("<%=RadEditor1.ClientID%>");
var stringVal = window.clipboardData.getData("Text");
if(stringVal != null){
editor.set_html(stringVal); //replaces the content of the editor with stringVal
editor.pasteHtml(stringVal); //pastes your string val at the cursor (Defaults to end of the content window if no cursor found)
}