手机版

ueditor 1.2.6使用说明

时间:2021-11-17 来源:互联网 编辑:宝哥软件园 浏览:

本文以php版本为例:文件下载:http://ueditor.baidu.com/website/download.html也可以先定义内容再下载,可以帮助我们精简很多东西。以本地php环境为例。现在,在www目录下建立一个app目录作为测试目录,然后将下载的ueditor文件夹解压到app文件夹。

然后,在应用程序文件夹下创建一个index.php文件。然后输入以下代码:复制代码如下:DOCTYPE htmlhtmlheadtitle编辑器/title meta http-equiv=' content-type ' content=' text/html '完整版示例;charset=UTF-8 '脚本类型=' text/JavaScript ' src=' http :/ueditor/ueditor . config . js/' script script type=' text/JavaScript ' src=' http :/ueditor/U editor . all . js '/script link rel='样式表' href='。/u editor/themes/default/CSS/u editor . CSS//head body h2ueditor提交示例/H2表单id=' form ' method=' post ' target=' _ blank ' script type=' text/plain ' id=' my editor ' name=' my editor ' p欢迎使用u editor!/p/脚本输入类型='提交'值='通过输入提交'/表单p从1.2.6开始。自动同步数据,无需手动调用sync方法按钮onclick=' document . getelementbyid(' form ')。submit()'调用submit submit通过js /button /p脚本类型=' text/JavaScript ' var editor _ a=UE . geteditor(' myEditor ',{ initial frameheight :500 });//-自动切换提交地址-var doc=document,version=editor _ a . options . imageurl | | ' PHP ',form=doc . getelementbyid(' form ');form.action='。/GetContent . PHP ';/script/body/html,然后在浏览器中输入localhost/app/即可查看编辑器;然后你会发现图像上传功能无法使用,所以需要打开ueditor.config.js找到这一行代码:复制代码如下: var URL=window . ueditor _ home _ URL | |(function(){然后在这一行代码上面添加这一行代码:复制代码如下: window . ueditor _ home _ URL | | '/app/u .

然后刷新页面,可以使用图片上传功能。ueditor官方描述文件地址:http://ueditor.baidu.com/website/document.html官方描述文件文件名有错误(版本升级后不应修改),请注意。

版权声明:ueditor 1.2.6使用说明是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。