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
在编写插件的时候,有可能会用得到。
方法二:
$("#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
在编写插件的时候,有可能会用得到。
上一篇: discuz URL 静态化