Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.78 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. how to set the content to radeditor using javascript
  2. var content = window.clipboardData.getData("Text");
  3.  
  4.    if (content != null) {
  5.       editor.set_html = content;
  6.        
  7. var newValue = "control alt delete";
  8.     $find("<%=RadEditor1.ClientID%>").set_html(newValue);
  9.        
  10. var editor = $find("<%=RadEditor1.ClientID%>");
  11. var content = window.clipboardData.getData("Text");
  12. if (content != null) {
  13.   editor.set_html = content;
  14.        
  15. var editor = $find("<%=RadEditor1.ClientID%>");
  16.     var stringVal = window.clipboardData.getData("Text");
  17.     if(stringVal != null){
  18.          editor.set_html(stringVal); //replaces the content of the editor with stringVal
  19.          editor.pasteHtml(stringVal); //pastes your string val at the cursor (Defaults to end of the content window if no cursor found)
  20.     }