本文以php版本为例:

文件下载:http://ueditor.baidu.com/website/download.html

还可以自己先定义内容,然后下载,这样可以帮助我们精简不少东西。

以本地php环境为例,现在www目录下建立一个app目录作为测试目录,然后将下载的ueditor文件夹解压到app文件夹下。

然后,在app文件夹下建立一个index.php文件。

然后输入以下代码:

<!DOCTYPE html>
<html>
<head>
<title>编辑器完整版实例</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="./ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="./ueditor/ueditor.all.js"></script>
<link rel="stylesheet" href="./ueditor/themes/default/css/ueditor.css"/>
</head>
<body>
<h2>UEditor提交示例</h2>
<form id="form" method="post" target="_blank">
<script type="text/plain" id="myEditor" name="myEditor">
<p>欢迎使用UEditor!</p>
</script>
<input type="submit" value="通过input的submit提交">
</form>
<p>
从1.2.6开始,会自动同步数据无需再手动调用sync方法
<button onclick="document.getElementById('form').submit()">通过js调用submit提交</button> </p> <script type="text/javascript">
var editor_a = UE.getEditor('myEditor',{initialFrameHeight: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/ueditor/";

然后,刷新一下页面,图片上传功能就可以使用了。

ueditor的官方说明文档地址:http://ueditor.baidu.com/website/document.html

官方说明文档中的文件名有错误(应该是版本升级之后没有修改过来),请大家注意。

ueditor 1.2.6使用方法的更多相关文章

  1. Ueditor百度编辑器中 setContent()方法的使用

    百度编辑器Ueditor所提供的setContent()方法作用是:设置或者改变编辑器里面的文字内容或html内容 函数说明:setContent(string,boolean); 参数string ...

  2. UEditor无法复制的解决方法

    今天终于知道UEditor不能复制的真正原因啦,还是自己一直没有仔细研究. UEditor 粘贴 Excell 中的表格时报错导致无法粘贴的解决办法 在UEditor一些版本中,如果粘贴Excell中 ...

  3. ueditor百度编辑器的赋值方法

    示例: http://ueditor.baidu.com/website/onlinedemo.html 引用代码: window.UMEDITOR_HOME_URL = $CONFIG['domai ...

  4. ueditor使用代码高亮的方法

    最近发现ueditor支持代码高亮,但是页面上并没有起效果,于是网上找了下,发现还需做如下修改: 1.页面引用以下资源文件(均位于ueditor目录中): <script type=" ...

  5. 百度编辑器Ueditor增加字体的修改方法

    http://www.jb51.net/article/109896.htm Ueditor本身自带11种字体  使用过程中这11种字体往往不能满足我们的需求,现在我要添加"仿宋" ...

  6. ueditor富文本编辑的使用方法

    平时在编写上传文件,图片,视频等等这些功能的代码会很繁琐,这里我介绍一款由百度推出的CuteEditor,是一款功能非常强大,支持图片上传.文件下载和word类似的文字编辑器.对于新闻发布系统和博客之 ...

  7. Ueditor百度编辑器中的 setContent()方法的使用

    百度编辑器Ueditor所提供的setContent()方法作用是:设置或者改变编辑器里面的文字内容或html内容 函数说明:setContent(string,boolean); 参数string ...

  8. thinkphp和ueditor自定义后台处理方法整合

    先了解一下ueditor后台请求参数与返回参数格式规范: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ...

  9. Ueditor 1.4.3.1 使用 ThinkPHP 3.2.3 的上传类进行图片上传

    在 ThinkPHP 3.2.3 中集成百度编辑器最新版 Ueditor 1.4.3.1,同时将编辑器自带的上传类替换成 ThinkPHP 3.2.3 中的上传类. ① 下载编辑器(下载地址:http ...

随机推荐

  1. Android Studio开发技巧

    为了android更有效率的开发,总结学习android集成开发环境(android studio1.3为例) android studio 1-打印log及配置ec快捷键 2-代码提示及移动快捷键 ...

  2. element-ui dialog组件添加可拖拽位置 可拖拽宽高

    edge浏览器下作的gifhttp://www.lanourteam.com/%E6... 有几个点需要注意一下 每个弹窗都要有唯一dom可操作 指令可以做到 拖拽时要添加可拖拽区块 header 由 ...

  3. Linux centos 6.5 搭建 svn服务器

    实例:web1 1.安装subversion #yum install subversion #mkdir -p /oop/svn/ //创建svn目录 #chmod -R 777 /oop/svn ...

  4. MyEclipse设置默认的文档注释和背景色设置

  5. @angular/cli项目构建--animations

    使用方法一(文件形式定义): animations.ts import { animate, AnimationEntryMetadata, state, style, transition, tri ...

  6. 网络编程基础--协程--greenlet切换---gevent自动识别 IO ---

    协程: 1 单线程来实现并发---协程: 协程:是单线程下的并发,又称微线程,纤程.英文名Coroutine.一句话说明什么是线程:协程是一种用户态的轻量级线程, 即协程是由用户程序自己控制调度的 只 ...

  7. mysql时间随笔

    SELECT FROM_UNIXTIME(create_time,'%Y-%m-%d %H:%i:%s') FROM `order`; select date_add(FROM_UNIXTIME(cr ...

  8. 常用Request对象获取请求信息

    Request.ServerVariables(“REMOTE_ADDR”) ‘获取访问IPRequest.ServerVariables(“LOCAL_ADDR”) ‘同上Request.Serve ...

  9. BZOJ4130:[PA2011]Kangaroos

    浅谈\(K-D\ Tree\):https://www.cnblogs.com/AKMer/p/10387266.html 题目传送门:https://lydsy.com/JudgeOnline/pr ...

  10. Visualforce入门第五篇_2017.3.1

    Visualforce添加过滤器,实现数据的筛选 参考原文:https://trailhead.salesforce.com/modules/visualforce_fundamentals/unit ...