---
title: "TP5 配置 UEditor 编辑器"
author: "onestopweb"
date: "2017-07-21T10:50:49Z"
tags: []
categories: ["Web前端"]
slug: "tp5-ueditor"
draft: false
lastmod: "2017-07-21T10:51:06Z"
id: 2386247
url: "https://onestopweb.iteye.com/blog/2386247"
---

```
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>UEditor 配置</title>
</head>
<body>
	<script id="container" name="content" type="text/plain" style="width:1000px;height:300px;"></script>
	{js href="/asset/ueditor/ueditor.config.js" /}
	{js href="/asset/ueditor/ueditor.all.js" /}
	<script type="text/javascript"> var ue = UE.getEditor('container');</script>
</body>
</html>
```

 

效果图：  
![](http://dl2.iteye.com/upload/attachment/0126/1662/3d6139e8-11a3-3f10-898e-a1527560ed17.png)  
 

其他的配置如下：

```
配置图片的上传路径在 php/config.json
将 "/ueditor/php/ 替换为 "/ 即可

配置编程器的工具栏在 ueditor.config.js
只需配置显示 源代码 撤消 粗体 重做 字体颜色 背景色 字体大小 有序列表 无序列表 超链接 单个图片上传 多个图片上传 附件上传 代码语言 日期 时间 插入表格 全屏

去掉 toolbar:false; 在 ueditor.all.min.js
查找 toolbar:false; 删除即可，该文档一共两个

修改代码语言 在 ueditor.all.min.js
PHP javaScript 等等
```