最新版的使用很简单 根据说明文档修改设置就OK
<body> <pre>
编辑器一般步骤 引入
个性设置 参考ueditor.config.js里面的配置项
把需要的配置的选项及值 拿出来
写一个对象 把该对象当作参数给
系统整合 主要就是上传路径的修改 只需把路径改成你想要的存放的路径即可
</pre>
<form action="02.php" method="post">
<!-- 加载编辑器的容器 -->
<!-- 详细描述 -->
<table width="90%" >
<tr>
<td><textarea id="goods" name="goods"></textarea></td>
</tr>
</table>
<input type="submit" value="提交">
<button onclick="getContent()">ajax提交</button>
</form>
</script>
<!-- 配置文件-->
<script type="text/javascript" src="./1011/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件-->
<script type="text/javascript" src="./1011/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
var ue = UE.getEditor('goods_desc',{
toolbars: [
['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
'directionalityltr', 'directionalityrtl', 'indent', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',]
],initialFrameWidth:750,initialContent:'欢迎留言!',
});
function getContent() {
var arr = [];
arr.push("使用editor.getContent()方法可以获得编辑器的内容");
arr.push("内容为:");
arr.push(UE.getEditor('goods_desc').getContent());
alert(arr.join("\n"));
}
function getPlainTxt() {
}
</script>
博客:http://www.zongscan.com