百度编辑器配置
来源:互联网 发布:数据库系统工程师书籍 编辑:程序博客网 时间:2024/06/16 16:25
1 下载源码 本次用的是[1.2.5.0 PHP 版本] UTF-8版,http://ueditor.baidu.com/website/download.html#
2 修改配置
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_config.js" type="text/javascript"></script>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_all.js" type="text/javascript"></script>
<textarea name="myContent" id="myEditor"></textarea>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
//1.2.4以后可以使用一下代码实例化编辑器
//UE.getEditor('myEditor')
</script>
3 修改editor_config.js文件里面的配置
URL = window.UEDITOR_HOME_URL||"/admin/ueditor/"; 文件的绝对路径
——————————————— 提交编辑器内容至后端 ————————————————————————
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_config.js" type="text/javascript"></script>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_all.js" type="text/javascript"></script>
</head>
<body>
<?php
echo "网站后台首页";
?>
<form action="test_save.php" method="post">
<textarea name="myContent" id="myEditor"></textarea>
<input type="submit" name="submit" value="提交">
</form>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
//1.2.4以后可以使用一下代码实例化编辑器
//UE.getEditor('myEditor')
</script>
<a href="http://tanning555.blog.163.com/blog/test02.php">编辑原有内容</a>
</body>
</html>
test02.php
<?php
header("content-type:text/html;charset=utf-8");
$conn=mysql_connect("localhost","root","root");
mysql_select_db("class_houtai");
mysql_query("set names utf8");
if(!$conn){
die("数据库连接失败!");
}
?>
<?php
$query=mysql_query("select * from test_ueditor ORDER BY RAND()");
$info=mysql_fetch_array($query);
?>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_config.js" type="text/javascript"></script>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_all.js" type="text/javascript"></script>
<form action="test_save.php" method="post">
<textarea name="myContent" id="myEditor">
<?php
echo $info['info'];
?>
</textarea>
<input type="submit" name="submit" value="提交">
</form>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
//1.2.4以后可以使用一下代码实例化编辑器
//UE.getEditor('myEditor')
</script>
____________________________________________________________
数据库文件
CREATE TABLE `test_ueditor` (
`id` int(11) NOT NULL auto_increment,
`info` varchar(9999) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
____________________________________________________________
ueditor上传图片的路径
改成在根目录下,而不是在ueditor下
修改imageup.php "savePath" => "../../upload/" ,
2 修改配置
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_config.js" type="text/javascript"></script>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_all.js" type="text/javascript"></script>
<textarea name="myContent" id="myEditor"></textarea>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
//1.2.4以后可以使用一下代码实例化编辑器
//UE.getEditor('myEditor')
</script>
3 修改editor_config.js文件里面的配置
URL = window.UEDITOR_HOME_URL||"/admin/ueditor/"; 文件的绝对路径
——————————————— 提交编辑器内容至后端 ————————————————————————
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_config.js" type="text/javascript"></script>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_all.js" type="text/javascript"></script>
</head>
<body>
<?php
echo "网站后台首页";
?>
<form action="test_save.php" method="post">
<textarea name="myContent" id="myEditor"></textarea>
<input type="submit" name="submit" value="提交">
</form>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
//1.2.4以后可以使用一下代码实例化编辑器
//UE.getEditor('myEditor')
</script>
<a href="http://tanning555.blog.163.com/blog/test02.php">编辑原有内容</a>
</body>
</html>
test02.php
<?php
header("content-type:text/html;charset=utf-8");
$conn=mysql_connect("localhost","root","root");
mysql_select_db("class_houtai");
mysql_query("set names utf8");
if(!$conn){
die("数据库连接失败!");
}
?>
<?php
$query=mysql_query("select * from test_ueditor ORDER BY RAND()");
$info=mysql_fetch_array($query);
?>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_config.js" type="text/javascript"></script>
<script src="http://tanning555.blog.163.com/blog/ueditor/editor_all.js" type="text/javascript"></script>
<form action="test_save.php" method="post">
<textarea name="myContent" id="myEditor">
<?php
echo $info['info'];
?>
</textarea>
<input type="submit" name="submit" value="提交">
</form>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
//1.2.4以后可以使用一下代码实例化编辑器
//UE.getEditor('myEditor')
</script>
____________________________________________________________
数据库文件
CREATE TABLE `test_ueditor` (
`id` int(11) NOT NULL auto_increment,
`info` varchar(9999) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
____________________________________________________________
ueditor上传图片的路径
改成在根目录下,而不是在ueditor下
修改imageup.php "savePath" => "../../upload/" ,
0 0
- 百度编辑器配置
- jsp配置百度编辑器细节
- 百度编辑器 百度编辑器
- 百度编辑器1.4.3的配置 jsp
- 百度富文本编辑器配置使用
- 百度编辑器关键配置 改变资源路径
- 百度文本编辑器UEditor,后端配置
- 百度编辑器独立上图片传配置
- 百度 在线编辑器ueditor1_4_3使用方法及配置
- thinkphp 3.2.2配置百度编辑器
- 百度编辑器Ueditor配置上传图片
- 百度编辑器
- 百度编辑器
- 百度编辑器
- 百度编辑器
- 百度编辑器
- 百度编辑器的YII插件的安装配置
- 百度编辑器ueditor上传图片及文件路径配置
- 第三次训练——The ? 1 ? 2 ? ... ? n = k problem
- win8下ie10打不开了
- 两位数乘法的速算方法(二)
- JavaSE —— 标准输入/输出
- cocostudio使用的一些心得
- 百度编辑器配置
- 向 OpenStack 贡献您的代码
- HDU 3974 Assign the task 并查集
- 使用PHP进行网页数据抓取小结
- 在 JScript 中使用 ADO
- 语音特征参数MFCC计算的详细过程
- 如何提交代码给openstack
- 研究生期间有关语音识别方面资料的收集
- Weblogic性能调优基本方案