ueditor 1.2.6使用方法
本文以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使用方法的更多相关文章
- Ueditor百度编辑器中 setContent()方法的使用
百度编辑器Ueditor所提供的setContent()方法作用是:设置或者改变编辑器里面的文字内容或html内容 函数说明:setContent(string,boolean); 参数string ...
- UEditor无法复制的解决方法
今天终于知道UEditor不能复制的真正原因啦,还是自己一直没有仔细研究. UEditor 粘贴 Excell 中的表格时报错导致无法粘贴的解决办法 在UEditor一些版本中,如果粘贴Excell中 ...
- ueditor百度编辑器的赋值方法
示例: http://ueditor.baidu.com/website/onlinedemo.html 引用代码: window.UMEDITOR_HOME_URL = $CONFIG['domai ...
- ueditor使用代码高亮的方法
最近发现ueditor支持代码高亮,但是页面上并没有起效果,于是网上找了下,发现还需做如下修改: 1.页面引用以下资源文件(均位于ueditor目录中): <script type=" ...
- 百度编辑器Ueditor增加字体的修改方法
http://www.jb51.net/article/109896.htm Ueditor本身自带11种字体 使用过程中这11种字体往往不能满足我们的需求,现在我要添加"仿宋" ...
- ueditor富文本编辑的使用方法
平时在编写上传文件,图片,视频等等这些功能的代码会很繁琐,这里我介绍一款由百度推出的CuteEditor,是一款功能非常强大,支持图片上传.文件下载和word类似的文字编辑器.对于新闻发布系统和博客之 ...
- Ueditor百度编辑器中的 setContent()方法的使用
百度编辑器Ueditor所提供的setContent()方法作用是:设置或者改变编辑器里面的文字内容或html内容 函数说明:setContent(string,boolean); 参数string ...
- 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 ...
- Ueditor 1.4.3.1 使用 ThinkPHP 3.2.3 的上传类进行图片上传
在 ThinkPHP 3.2.3 中集成百度编辑器最新版 Ueditor 1.4.3.1,同时将编辑器自带的上传类替换成 ThinkPHP 3.2.3 中的上传类. ① 下载编辑器(下载地址:http ...
随机推荐
- hdu 5240 Exam(贪心)
Exam Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- Amazon EMR(Elastic MapReduce):亚马逊Hadoop托管服务运行架构&Hadoop云服务之战:微软vs.亚马逊
http://s3tools.org/s3cmd Amazon Elastic MapReduce (Amazon EMR)简介 Amazon Elastic MapReduce (Amazon EM ...
- Java_脚本引擎_03_nashorn支持es6
一.前言 jdk1.8的nashorn 支持部分es6语法. 二.支持es6 jdk默认是关闭了对es6的支持的,想要开启对es6的支持,需要设置一下jvm参数: -Dnashorn.args=--l ...
- 2018.7.30 Designing a Qi-compliant receiver coil for wireless power systems
1) 找资料: http://www.mouser.cn/datasheet/2/389/stwlc33-1156583.pdf https://training.ti.com/wireless-po ...
- (转)轻量级C语言实现的minixml解析库入门教程
svn上的minixml源码下载:svn co http://svn.msweet.org/mxml/tags/release-2.7/ 按照下载回来的源代码进行编译和安装.本教程只针对新手做一个引导 ...
- Uva1401(字典树)
1401 - Remember the Word Time limit: 3.000 seconds Neal is very curious about combinatorial problems ...
- [转]C++ 智能指针详解
转自:http://blog.csdn.net/xt_xiaotian/article/details/5714477 C++ 智能指针详解 一.简介 由于 C++ 语言没有自动内存回收机制,程序员每 ...
- [leetcode]_Flatten Binary Tree to Linked List
题目:将一棵二叉树履平成一个类似Linked-list的东西. 思路:该过程类似于二叉树的前序遍历,但是遍历代码,我处理不来参数的变化.没AC. -------->写的很好的解题博客 参考上述博 ...
- 1110. Complete Binary Tree (25)
Given a tree, you are supposed to tell if it is a complete binary tree. Input Specification: Each in ...
- poj2411 Mondriaan's Dream[简单状压dp]
$11*11$格子板上铺$1*2$地砖方案.以前做过?权当复习算了,毕竟以前学都是浅尝辄止的..常规题,注意两个条件:上一行铺竖着的则这一行同一位一定要铺上竖的,这一行单独铺横的要求枚举集合中出现连续 ...