首页 > cms建站系统 > discuz

读取和设置discuz发帖编辑器里面的内容

发布时间:2016-5-19 22:52

方法一:
switchEditor(0);
JQ("#e_textarea").val("这儿是编辑器的内容,不用直接用html代码");
discuzcode('svd');
switchEditor(1);




方法二:
$("#e_iframe").contents().find("body").html(“这儿可以在编辑器内部显示html代码”);


方法三:
newEditor(1,"e<hr>e中国<strong>xxxx</strong>e");  //直接解析html代码
newEditor(0,"e<hr>e中国<strong>xxxx</strong>e");  //不解析html代码


newEditor是discuz内置的编辑器函数,原型定义在/static/js/editor.js



在编写插件的时候,有可能会用得到。
 
标签:[!--infotagslink--]

您可能感兴趣的文章: