如何使用javascript将内容设置为radeditor [英] how to set the content to radeditor using javascript
本文介绍了如何使用javascript将内容设置为radeditor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Radeditor。我需要从剪贴板中获取内容并设置为编辑器内容。
I am using Radeditor. i need to get the content from clip board and set to editor conten.
我得到了内容。但是我将内容设置为编辑页面,它显示为空。
i am get the content. but i set the content to editor page, it shows empty.
我正在使用以下代码。
var content = window.clipboardData.getData("Text");
if (content != null) {
editor.set_html = content;
所以我尝试绑定服务器端的内容。所以我使用pagemethods.i调用服务器端函数在脚本管理器中设置EnablePageMethods =true。
so i try to bind the content in server side. so i called the server side function using pagemethods.i set EnablePageMethods ="true" in script manager.
但它显示页面方法未定义。
but it shows page methods is undefined.
我的第一优先级是使用java脚本设置内容。
my first priority is set the content using java script.
如何做到这一点?
谢谢,
Pooja
推荐答案
尝试下面代码:
var newValue = "control alt delete";
$find("<%=RadEditor1.ClientID%>").set_html(newValue);
问候,
Dhaval Shukla
Dhaval Shukla
这篇关于如何使用javascript将内容设置为radeditor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文