在插件模版中 加入
<textarea class="userData" name="content" id="uchome-ttHtmlEditor" style="height: 100%; width: 100%; display: none; border: 0px"></textarea>
<iframe src="home.php?mod=editor&charset={CHARSET}&allowhtml=1&isportal=0" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:700px;height:400px;border:1px solid #C5C5C5;position:relative;"></iframe>
摁钮中键入validate函数
提交
在模版最后加入提交验证函数,具体里面规则自己写,以下是函数名称和把在线编辑器的内容放到textarea里
function validate(obj) {
edit_save();
window.onbeforeunload = null;
obj.form.submit();
return false;
}
在插件的php文件中,用$_G[‘gp_content’]提取就可以了.
切记:最主要的就是 edit_save();这个函数