├── .gitignore
├── README.md
├── example
├── app.js
├── bin
│ └── www
├── package.json
├── public
│ ├── stylesheets
│ │ └── style.css
│ └── ueditor
│ │ ├── .DS_Store
│ │ ├── dialogs
│ │ ├── attachment
│ │ │ ├── attachment.css
│ │ │ ├── attachment.html
│ │ │ ├── attachment.js
│ │ │ ├── fileTypeImages
│ │ │ │ ├── icon_chm.gif
│ │ │ │ ├── icon_default.png
│ │ │ │ ├── icon_doc.gif
│ │ │ │ ├── icon_exe.gif
│ │ │ │ ├── icon_jpg.gif
│ │ │ │ ├── icon_mp3.gif
│ │ │ │ ├── icon_mv.gif
│ │ │ │ ├── icon_pdf.gif
│ │ │ │ ├── icon_ppt.gif
│ │ │ │ ├── icon_psd.gif
│ │ │ │ ├── icon_rar.gif
│ │ │ │ ├── icon_txt.gif
│ │ │ │ └── icon_xls.gif
│ │ │ └── images
│ │ │ │ ├── alignicon.gif
│ │ │ │ ├── alignicon.png
│ │ │ │ ├── bg.png
│ │ │ │ ├── file-icons.gif
│ │ │ │ ├── file-icons.png
│ │ │ │ ├── icons.gif
│ │ │ │ ├── icons.png
│ │ │ │ ├── image.png
│ │ │ │ ├── progress.png
│ │ │ │ ├── success.gif
│ │ │ │ └── success.png
│ │ ├── emotion
│ │ │ ├── emotion.css
│ │ │ ├── emotion.html
│ │ │ ├── emotion.js
│ │ │ └── images
│ │ │ │ ├── 0.gif
│ │ │ │ ├── bface.gif
│ │ │ │ ├── cface.gif
│ │ │ │ ├── fface.gif
│ │ │ │ ├── jxface2.gif
│ │ │ │ ├── neweditor-tab-bg.png
│ │ │ │ ├── tface.gif
│ │ │ │ ├── wface.gif
│ │ │ │ └── yface.gif
│ │ ├── help
│ │ │ ├── help.css
│ │ │ ├── help.html
│ │ │ └── help.js
│ │ ├── image
│ │ │ ├── image.css
│ │ │ ├── image.html
│ │ │ ├── image.js
│ │ │ └── images
│ │ │ │ ├── alignicon.jpg
│ │ │ │ ├── bg.png
│ │ │ │ ├── icons.gif
│ │ │ │ ├── icons.png
│ │ │ │ ├── image.png
│ │ │ │ ├── progress.png
│ │ │ │ ├── success.gif
│ │ │ │ └── success.png
│ │ ├── internal.js
│ │ └── link
│ │ │ └── link.html
│ │ ├── index.html
│ │ ├── lang
│ │ └── zh-cn
│ │ │ ├── images
│ │ │ ├── copy.png
│ │ │ ├── localimage.png
│ │ │ ├── music.png
│ │ │ └── upload.png
│ │ │ └── zh-cn.js
│ │ ├── nodejs
│ │ └── config.json
│ │ ├── themes
│ │ ├── default
│ │ │ ├── css
│ │ │ │ ├── ueditor.css
│ │ │ │ └── ueditor.min.css
│ │ │ ├── dialogbase.css
│ │ │ └── images
│ │ │ │ ├── anchor.gif
│ │ │ │ ├── arrow.png
│ │ │ │ ├── arrow_down.png
│ │ │ │ ├── arrow_up.png
│ │ │ │ ├── button-bg.gif
│ │ │ │ ├── cancelbutton.gif
│ │ │ │ ├── charts.png
│ │ │ │ ├── cursor_h.gif
│ │ │ │ ├── cursor_h.png
│ │ │ │ ├── cursor_v.gif
│ │ │ │ ├── cursor_v.png
│ │ │ │ ├── dialog-title-bg.png
│ │ │ │ ├── filescan.png
│ │ │ │ ├── highlighted.gif
│ │ │ │ ├── icons-all.gif
│ │ │ │ ├── icons.gif
│ │ │ │ ├── icons.png
│ │ │ │ ├── loaderror.png
│ │ │ │ ├── loading.gif
│ │ │ │ ├── lock.gif
│ │ │ │ ├── neweditor-tab-bg.png
│ │ │ │ ├── pagebreak.gif
│ │ │ │ ├── scale.png
│ │ │ │ ├── sortable.png
│ │ │ │ ├── spacer.gif
│ │ │ │ ├── sparator_v.png
│ │ │ │ ├── table-cell-align.png
│ │ │ │ ├── tangram-colorpicker.png
│ │ │ │ ├── toolbar_bg.png
│ │ │ │ ├── unhighlighted.gif
│ │ │ │ ├── upload.png
│ │ │ │ ├── videologo.gif
│ │ │ │ ├── word.gif
│ │ │ │ └── wordpaste.png
│ │ └── iframe.css
│ │ ├── third-party
│ │ ├── codemirror
│ │ │ ├── codemirror.css
│ │ │ └── codemirror.js
│ │ ├── jquery-1.10.2.js
│ │ ├── jquery-1.10.2.min.js
│ │ ├── jquery-1.10.2.min.map
│ │ └── webuploader
│ │ │ ├── Uploader.swf
│ │ │ ├── webuploader.css
│ │ │ ├── webuploader.custom.js
│ │ │ ├── webuploader.custom.min.js
│ │ │ ├── webuploader.flashonly.js
│ │ │ ├── webuploader.flashonly.min.js
│ │ │ ├── webuploader.html5only.js
│ │ │ ├── webuploader.html5only.min.js
│ │ │ ├── webuploader.js
│ │ │ ├── webuploader.min.js
│ │ │ ├── webuploader.withoutimage.js
│ │ │ └── webuploader.withoutimage.min.js
│ │ ├── ueditor.all.js
│ │ ├── ueditor.all.min.js
│ │ ├── ueditor.config.js
│ │ ├── ueditor.parse.js
│ │ └── ueditor.parse.min.js
├── views
│ ├── .DS_Store
│ └── ueditor.html
└── yarn.lock
├── index.js
├── lib
└── index.js
├── package.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # Compiled binary addons (http://nodejs.org/api/addons.html)
20 | build/Release
21 |
22 | # Dependency directory
23 | # Deployed apps should consider commenting this line out:
24 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
25 | node_modules
26 |
27 | .DS_Store
28 | example/public/file/ueditor/*
29 | example/public/img/ueditor/*
30 | example/public/img/images/*
31 | .idea/*
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Node.js : ueditor
2 |
3 |
4 | [UEditor](https://github.com/fex-team/ueditor) 官方支持的版本有PHP JSP ASP .NET.
5 |
6 | ueditor for nodejs 可以让你的UEditor支持nodejs
7 |
8 | ## ueditor@1.0.0 已经全面升级 。
9 |
10 | ##Installation
11 |
12 | ```
13 | npm install ueditor --save
14 |
15 | ```
16 |
17 |
18 | ## Usage
19 |
20 | ```javascript
21 |
22 |
23 | var bodyParser = require('body-parser')
24 | var ueditor = require("ueditor")
25 | app.use(bodyParser.urlencoded({
26 | extended: true
27 | }))
28 | app.use(bodyParser.json());
29 |
30 | // /ueditor 入口地址配置 https://github.com/netpi/ueditor/blob/master/example/public/ueditor/ueditor.config.js
31 | // 官方例子是这样的 serverUrl: URL + "php/controller.php"
32 | // 我们要把它改成 serverUrl: URL + 'ue'
33 | app.use("/ueditor/ue", ueditor(path.join(__dirname, 'public'), function(req, res, next) {
34 |
35 | // ueditor 客户发起上传图片请求
36 |
37 | if(req.query.action === 'uploadimage'){
38 |
39 | // 这里你可以获得上传图片的信息
40 | var foo = req.ueditor;
41 | console.log(foo.filename); // exp.png
42 | console.log(foo.encoding); // 7bit
43 | console.log(foo.mimetype); // image/png
44 |
45 | // 下面填写你要把图片保存到的路径 ( 以 path.join(__dirname, 'public') 作为根路径)
46 | var img_url = 'yourpath';
47 | res.ue_up(img_url); //你只要输入要保存的地址 。保存操作交给ueditor来做
48 | }
49 | // 客户端发起图片列表请求
50 | else if (req.query.action === 'listimage'){
51 | var dir_url = 'your img_dir'; // 要展示给客户端的文件夹路径
52 | res.ue_list(dir_url) // 客户端会列出 dir_url 目录下的所有图片
53 | }
54 | // 客户端发起其它请求
55 | else {
56 |
57 | res.setHeader('Content-Type', 'application/json');
58 | // 这里填写 ueditor.config.json 这个文件的路径
59 | res.redirect('/ueditor/ueditor.config.json')
60 | }}));
61 |
62 | ```
63 | ### 七牛上传
64 | ```javascript
65 |
66 | var bodyParser = require('body-parser')
67 | var ueditor = require("ueditor")
68 | app.use(bodyParser.urlencoded({
69 | extended: true
70 | }))
71 | app.use(bodyParser.json());
72 |
73 | // 支持七牛上传,如有需要请配置好qn参数,如果没有qn参数则存储在本地
74 | app.use("/ueditor/ue", ueditor(path.join(__dirname, 'public'), {
75 | qn: {
76 | accessKey: 'your access key',
77 | secretKey: 'your secret key',
78 | bucket: 'your bucket name',
79 | origin: 'http://{bucket}.u.qiniudn.com'
80 | }
81 | }, function(req, res, next) {
82 | // ueditor 客户发起上传图片请求
83 | var imgDir = '/img/ueditor/'
84 | if(req.query.action === 'uploadimage'){
85 | var foo = req.ueditor;
86 |
87 | var imgname = req.ueditor.filename;
88 |
89 |
90 | res.ue_up(imgDir); //你只要输入要保存的地址 。保存操作交给ueditor来做
91 | }
92 | // 客户端发起图片列表请求
93 | else if (req.query.action === 'listimage'){
94 |
95 | res.ue_list(imgDir); // 客户端会列出 dir_url 目录下的所有图片
96 | }
97 | // 客户端发起其它请求
98 | else {
99 |
100 | res.setHeader('Content-Type', 'application/json');
101 | res.redirect('/ueditor/ueditor.config.json')
102 | }}));
103 |
104 | ```
105 | ### FDFS上传
106 | ```javascript
107 |
108 | var bodyParser = require('body-parser')
109 | var ueditor = require("ueditor")
110 | app.use(bodyParser.urlencoded({
111 | extended: true
112 | }))
113 | app.use(bodyParser.json());
114 |
115 | //FDFS config 参数配置
116 | var ueditorConfig = {
117 | fdfs: {
118 | /* Require 必须 */
119 | upload: {
120 | host: '192.168.0.40', //fdfs 上传服务器 host
121 | port: '22122' // 上传服务器端口(一般默认22122)
122 | },
123 | download: {
124 | host: '192.168.0.82' //fdfs 下载服务器host
125 | },
126 | /* Require 必须 */
127 | /* 可缺省 */
128 | defaultExt: 'jpg', //默认后缀为png
129 | charset: 'utf8', //默认为utf8
130 | timeout: 20 * 1000 //默认超时时间10s
131 | /* 可缺省 */
132 | }
133 | };
134 |
135 | // 支持FDFS上传,upload跟download字段必填
136 | app.use("/ueditor/ue", ueditor(path.join(__dirname, 'public'), ueditorConfig, function(req, res, next) {
137 | // ueditor 客户发起上传图片请求
138 | var imgDir = '/img/ueditor/'
139 | if(req.query.action === 'uploadimage'){
140 | var foo = req.ueditor;
141 |
142 | var imgname = req.ueditor.filename;
143 |
144 |
145 | res.ue_up(imgDir); //你只要输入要保存的地址 。保存操作交给ueditor来做
146 | }
147 | // 客户端发起图片列表请求
148 | else if (req.query.action === 'listimage'){
149 |
150 | res.ue_list(imgDir); // 客户端会列出 dir_url 目录下的所有图片
151 | }
152 | // 客户端发起其它请求
153 | else {
154 |
155 | res.setHeader('Content-Type', 'application/json');
156 | res.redirect('/ueditor/ueditor.config.json')
157 | }}));
158 |
159 | ```
160 |
161 | ### 多类型文件上传 (附件 视频 图片)
162 | ```javascript
163 |
164 | var bodyParser = require('body-parser')
165 | var ueditor = require("ueditor")
166 | app.use(bodyParser.urlencoded({
167 | extended: true
168 | }))
169 | app.use(bodyParser.json());
170 |
171 | app.use("/ueditor/ue", ueditor(path.join(__dirname, 'public'), function(req, res, next) {
172 | var imgDir = '/img/ueditor/' //默认上传地址为图片
173 | var ActionType = req.query.action;
174 | if (ActionType === 'uploadimage' || ActionType === 'uploadfile' || ActionType === 'uploadvideo') {
175 | var file_url = imgDir;//默认上传地址为图片
176 | /*其他上传格式的地址*/
177 | if (ActionType === 'uploadfile') {
178 | file_url = '/file/ueditor/'; //附件保存地址
179 | }
180 | if (ActionType === 'uploadvideo') {
181 | file_url = '/video/ueditor/'; //视频保存地址
182 | }
183 | res.ue_up(file_url); //你只要输入要保存的地址 。保存操作交给ueditor来做
184 | res.setHeader('Content-Type', 'text/html');
185 | }
186 | //客户端发起图片列表请求
187 | else if (ActionType === 'listimage'){
188 |
189 | res.ue_list(imgDir); // 客户端会列出 dir_url 目录下的所有图片
190 | }
191 | // 客户端发起其它请求
192 | else {
193 | res.setHeader('Content-Type', 'application/json');
194 | res.redirect('/ueditor/ueditor.config.json')
195 | }}));
196 |
197 | ```
198 |
199 | ### 上传配置
200 | ```javascript
201 | app.use("/ueditor/ue", static_url, config = {}, callback);
202 | ```
203 | 当config为空时,会默认把图片上传到 static_url + '/img/ueditor' 目录下。
204 | 比如例子“Usage”中图片会上传到项目的 public/img/ueditor 目录。
205 |
206 | 当配置了 config.qn 图片则只会上传到七牛服务器而不会上传到项目目录。
207 | 同时上传到七牛和项目目录,只需配置 config.local 即可
208 | ```javascript
209 | config = {
210 | qn: { ... },
211 | local: true
212 | }
213 | ```
214 |
215 | 你可以来[ueditor:nodejs](http://blog.netpi.me/nodejs/ueditor-nodejs)给作者留言
216 |
217 |
--------------------------------------------------------------------------------
/example/app.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var ejs = require('ejs');
3 | var path = require('path');
4 | var app = express();
5 |
6 | var ueditor = require("../");
7 | var bodyParser = require('body-parser');
8 |
9 | app.use(bodyParser.urlencoded({
10 | extended: true
11 | }));
12 | app.use(bodyParser.json());
13 | // view engine setup
14 |
15 |
16 | app.use(express.static(path.join(__dirname, 'public')));
17 | app.set('views', path.join(__dirname, 'views'));
18 | app.engine('.html', ejs.__express);
19 | app.set('view engine', 'html');
20 |
21 | app.use("/ueditor/ue", ueditor(path.join(__dirname, 'public'), function (req, res, next) {
22 | //客户端上传文件设置
23 | var imgDir = '/img/ueditor/'
24 | var ActionType = req.query.action;
25 | if (ActionType === 'uploadimage' || ActionType === 'uploadfile' || ActionType === 'uploadvideo') {
26 | var file_url = imgDir;//默认图片上传地址
27 | /*其他上传格式的地址*/
28 | if (ActionType === 'uploadfile') {
29 | file_url = '/file/ueditor/'; //附件
30 | }
31 | if (ActionType === 'uploadvideo') {
32 | file_url = '/video/ueditor/'; //视频
33 | }
34 | res.ue_up(file_url); //你只要输入要保存的地址 。保存操作交给ueditor来做
35 | res.setHeader('Content-Type', 'text/html');
36 | }
37 | // 客户端发起图片列表请求
38 | else if (req.query.action === 'listimage') {
39 | var dir_url = imgDir;
40 | res.ue_list(dir_url); // 客户端会列出 dir_url 目录下的所有图片
41 | }
42 | // 客户端发起其它请求
43 | else {
44 | // console.log('config.json')
45 | res.setHeader('Content-Type', 'application/json');
46 | res.redirect('/ueditor/nodejs/config.json');
47 | }
48 | }));
49 |
50 |
51 |
52 |
53 | app.use('/', function (req, res) {
54 | res.render('ueditor');
55 | });
56 |
57 | app.listen(3000, function () {
58 | console.log('app listen : 3000');
59 | });
60 |
61 | module.exports = app;
62 |
--------------------------------------------------------------------------------
/example/bin/www:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | var debug = require('debug')('example');
3 | var app = require('../app');
4 |
5 | app.set('port', process.env.PORT || 3000);
6 |
7 | var server = app.listen(app.get('port'), function() {
8 | debug('Express server listening on port ' + server.address().port);
9 | });
10 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node app.js"
7 | },
8 | "dependencies": {
9 | "body-parser": "~1.0.0",
10 | "cookie-parser": "~1.0.1",
11 | "debug": "~0.7.4",
12 | "ejs": "^1.0.0",
13 | "express": "~4.2.0",
14 | "morgan": "~1.0.0",
15 | "static-favicon": "~1.0.0",
16 | "ueditor": "^1.0.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/example/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 50px;
3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4 | }
5 |
6 | a {
7 | color: #00B7FF;
8 | }
--------------------------------------------------------------------------------
/example/public/ueditor/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/.DS_Store
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/attachment.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | /* dialog样式 */
3 | .wrapper {
4 | zoom: 1;
5 | width: 630px;
6 | *width: 626px;
7 | height: 380px;
8 | margin: 0 auto;
9 | padding: 10px;
10 | position: relative;
11 | font-family: sans-serif;
12 | }
13 |
14 | /*tab样式框大小*/
15 | .tabhead {
16 | float:left;
17 | }
18 | .tabbody {
19 | width: 100%;
20 | height: 346px;
21 | position: relative;
22 | clear: both;
23 | }
24 |
25 | .tabbody .panel {
26 | position: absolute;
27 | width: 0;
28 | height: 0;
29 | background: #fff;
30 | overflow: hidden;
31 | display: none;
32 | }
33 |
34 | .tabbody .panel.focus {
35 | width: 100%;
36 | height: 346px;
37 | display: block;
38 | }
39 |
40 | /* 上传附件 */
41 | .tabbody #upload.panel {
42 | width: 0;
43 | height: 0;
44 | overflow: hidden;
45 | position: absolute !important;
46 | clip: rect(1px, 1px, 1px, 1px);
47 | background: #fff;
48 | display: block;
49 | }
50 |
51 | .tabbody #upload.panel.focus {
52 | width: 100%;
53 | height: 346px;
54 | display: block;
55 | clip: auto;
56 | }
57 |
58 | #upload .queueList {
59 | margin: 0;
60 | width: 100%;
61 | height: 100%;
62 | position: absolute;
63 | overflow: hidden;
64 | }
65 |
66 | #upload p {
67 | margin: 0;
68 | }
69 |
70 | .element-invisible {
71 | width: 0 !important;
72 | height: 0 !important;
73 | border: 0;
74 | padding: 0;
75 | margin: 0;
76 | overflow: hidden;
77 | position: absolute !important;
78 | clip: rect(1px, 1px, 1px, 1px);
79 | }
80 |
81 | #upload .placeholder {
82 | margin: 10px;
83 | border: 2px dashed #e6e6e6;
84 | *border: 0px dashed #e6e6e6;
85 | height: 172px;
86 | padding-top: 150px;
87 | text-align: center;
88 | background: url(./images/image.png) center 70px no-repeat;
89 | color: #cccccc;
90 | font-size: 18px;
91 | position: relative;
92 | top:0;
93 | *top: 10px;
94 | }
95 |
96 | #upload .placeholder .webuploader-pick {
97 | font-size: 18px;
98 | background: #00b7ee;
99 | border-radius: 3px;
100 | line-height: 44px;
101 | padding: 0 30px;
102 | *width: 120px;
103 | color: #fff;
104 | display: inline-block;
105 | margin: 0 auto 20px auto;
106 | cursor: pointer;
107 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
108 | }
109 |
110 | #upload .placeholder .webuploader-pick-hover {
111 | background: #00a2d4;
112 | }
113 |
114 |
115 | #filePickerContainer {
116 | text-align: center;
117 | }
118 |
119 | #upload .placeholder .flashTip {
120 | color: #666666;
121 | font-size: 12px;
122 | position: absolute;
123 | width: 100%;
124 | text-align: center;
125 | bottom: 20px;
126 | }
127 |
128 | #upload .placeholder .flashTip a {
129 | color: #0785d1;
130 | text-decoration: none;
131 | }
132 |
133 | #upload .placeholder .flashTip a:hover {
134 | text-decoration: underline;
135 | }
136 |
137 | #upload .placeholder.webuploader-dnd-over {
138 | border-color: #999999;
139 | }
140 |
141 | #upload .filelist {
142 | list-style: none;
143 | margin: 0;
144 | padding: 0;
145 | overflow-x: hidden;
146 | overflow-y: auto;
147 | position: relative;
148 | height: 300px;
149 | }
150 |
151 | #upload .filelist:after {
152 | content: '';
153 | display: block;
154 | width: 0;
155 | height: 0;
156 | overflow: hidden;
157 | clear: both;
158 | }
159 |
160 | #upload .filelist li {
161 | width: 113px;
162 | height: 113px;
163 | background: url(./images/bg.png);
164 | text-align: center;
165 | margin: 9px 0 0 9px;
166 | *margin: 6px 0 0 6px;
167 | position: relative;
168 | display: block;
169 | float: left;
170 | overflow: hidden;
171 | font-size: 12px;
172 | }
173 |
174 | #upload .filelist li p.log {
175 | position: relative;
176 | top: -45px;
177 | }
178 |
179 | #upload .filelist li p.title {
180 | position: absolute;
181 | top: 0;
182 | left: 0;
183 | width: 100%;
184 | overflow: hidden;
185 | white-space: nowrap;
186 | text-overflow: ellipsis;
187 | top: 5px;
188 | text-indent: 5px;
189 | text-align: left;
190 | }
191 |
192 | #upload .filelist li p.progress {
193 | position: absolute;
194 | width: 100%;
195 | bottom: 0;
196 | left: 0;
197 | height: 8px;
198 | overflow: hidden;
199 | z-index: 50;
200 | margin: 0;
201 | border-radius: 0;
202 | background: none;
203 | -webkit-box-shadow: 0 0 0;
204 | }
205 |
206 | #upload .filelist li p.progress span {
207 | display: none;
208 | overflow: hidden;
209 | width: 0;
210 | height: 100%;
211 | background: #1483d8 url(./images/progress.png) repeat-x;
212 |
213 | -webit-transition: width 200ms linear;
214 | -moz-transition: width 200ms linear;
215 | -o-transition: width 200ms linear;
216 | -ms-transition: width 200ms linear;
217 | transition: width 200ms linear;
218 |
219 | -webkit-animation: progressmove 2s linear infinite;
220 | -moz-animation: progressmove 2s linear infinite;
221 | -o-animation: progressmove 2s linear infinite;
222 | -ms-animation: progressmove 2s linear infinite;
223 | animation: progressmove 2s linear infinite;
224 |
225 | -webkit-transform: translateZ(0);
226 | }
227 |
228 | @-webkit-keyframes progressmove {
229 | 0% {
230 | background-position: 0 0;
231 | }
232 | 100% {
233 | background-position: 17px 0;
234 | }
235 | }
236 |
237 | @-moz-keyframes progressmove {
238 | 0% {
239 | background-position: 0 0;
240 | }
241 | 100% {
242 | background-position: 17px 0;
243 | }
244 | }
245 |
246 | @keyframes progressmove {
247 | 0% {
248 | background-position: 0 0;
249 | }
250 | 100% {
251 | background-position: 17px 0;
252 | }
253 | }
254 |
255 | #upload .filelist li p.imgWrap {
256 | position: relative;
257 | z-index: 2;
258 | line-height: 113px;
259 | vertical-align: middle;
260 | overflow: hidden;
261 | width: 113px;
262 | height: 113px;
263 |
264 | -webkit-transform-origin: 50% 50%;
265 | -moz-transform-origin: 50% 50%;
266 | -o-transform-origin: 50% 50%;
267 | -ms-transform-origin: 50% 50%;
268 | transform-origin: 50% 50%;
269 |
270 | -webit-transition: 200ms ease-out;
271 | -moz-transition: 200ms ease-out;
272 | -o-transition: 200ms ease-out;
273 | -ms-transition: 200ms ease-out;
274 | transition: 200ms ease-out;
275 | }
276 | #upload .filelist li p.imgWrap.notimage {
277 | margin-top: 0;
278 | width: 111px;
279 | height: 111px;
280 | border: 1px #eeeeee solid;
281 | }
282 | #upload .filelist li p.imgWrap.notimage i.file-preview {
283 | margin-top: 15px;
284 | }
285 |
286 | #upload .filelist li img {
287 | width: 100%;
288 | }
289 |
290 | #upload .filelist li p.error {
291 | background: #f43838;
292 | color: #fff;
293 | position: absolute;
294 | bottom: 0;
295 | left: 0;
296 | height: 28px;
297 | line-height: 28px;
298 | width: 100%;
299 | z-index: 100;
300 | display:none;
301 | }
302 |
303 | #upload .filelist li .success {
304 | display: block;
305 | position: absolute;
306 | left: 0;
307 | bottom: 0;
308 | height: 40px;
309 | width: 100%;
310 | z-index: 200;
311 | background: url(./images/success.png) no-repeat right bottom;
312 | background-image: url(./images/success.gif) \9;
313 | }
314 |
315 | #upload .filelist li.filePickerBlock {
316 | width: 113px;
317 | height: 113px;
318 | background: url(./images/image.png) no-repeat center 12px;
319 | border: 1px solid #eeeeee;
320 | border-radius: 0;
321 | }
322 | #upload .filelist li.filePickerBlock div.webuploader-pick {
323 | width: 100%;
324 | height: 100%;
325 | margin: 0;
326 | padding: 0;
327 | opacity: 0;
328 | background: none;
329 | font-size: 0;
330 | }
331 |
332 | #upload .filelist div.file-panel {
333 | position: absolute;
334 | height: 0;
335 | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
336 | background: rgba(0, 0, 0, 0.5);
337 | width: 100%;
338 | top: 0;
339 | left: 0;
340 | overflow: hidden;
341 | z-index: 300;
342 | }
343 |
344 | #upload .filelist div.file-panel span {
345 | width: 24px;
346 | height: 24px;
347 | display: inline;
348 | float: right;
349 | text-indent: -9999px;
350 | overflow: hidden;
351 | background: url(./images/icons.png) no-repeat;
352 | background: url(./images/icons.gif) no-repeat \9;
353 | margin: 5px 1px 1px;
354 | cursor: pointer;
355 | -webkit-tap-highlight-color: rgba(0,0,0,0);
356 | -webkit-user-select: none;
357 | -moz-user-select: none;
358 | -ms-user-select: none;
359 | user-select: none;
360 | }
361 |
362 | #upload .filelist div.file-panel span.rotateLeft {
363 | display:none;
364 | background-position: 0 -24px;
365 | }
366 |
367 | #upload .filelist div.file-panel span.rotateLeft:hover {
368 | background-position: 0 0;
369 | }
370 |
371 | #upload .filelist div.file-panel span.rotateRight {
372 | display:none;
373 | background-position: -24px -24px;
374 | }
375 |
376 | #upload .filelist div.file-panel span.rotateRight:hover {
377 | background-position: -24px 0;
378 | }
379 |
380 | #upload .filelist div.file-panel span.cancel {
381 | background-position: -48px -24px;
382 | }
383 |
384 | #upload .filelist div.file-panel span.cancel:hover {
385 | background-position: -48px 0;
386 | }
387 |
388 | #upload .statusBar {
389 | height: 45px;
390 | border-bottom: 1px solid #dadada;
391 | margin: 0 10px;
392 | padding: 0;
393 | line-height: 45px;
394 | vertical-align: middle;
395 | position: relative;
396 | }
397 |
398 | #upload .statusBar .progress {
399 | border: 1px solid #1483d8;
400 | width: 198px;
401 | background: #fff;
402 | height: 18px;
403 | position: absolute;
404 | top: 12px;
405 | display: none;
406 | text-align: center;
407 | line-height: 18px;
408 | color: #6dbfff;
409 | margin: 0 10px 0 0;
410 | }
411 | #upload .statusBar .progress span.percentage {
412 | width: 0;
413 | height: 100%;
414 | left: 0;
415 | top: 0;
416 | background: #1483d8;
417 | position: absolute;
418 | }
419 | #upload .statusBar .progress span.text {
420 | position: relative;
421 | z-index: 10;
422 | }
423 |
424 | #upload .statusBar .info {
425 | display: inline-block;
426 | font-size: 14px;
427 | color: #666666;
428 | }
429 |
430 | #upload .statusBar .btns {
431 | position: absolute;
432 | top: 7px;
433 | right: 0;
434 | line-height: 30px;
435 | }
436 |
437 | #filePickerBtn {
438 | display: inline-block;
439 | float: left;
440 | }
441 | #upload .statusBar .btns .webuploader-pick,
442 | #upload .statusBar .btns .uploadBtn,
443 | #upload .statusBar .btns .uploadBtn.state-uploading,
444 | #upload .statusBar .btns .uploadBtn.state-paused {
445 | background: #ffffff;
446 | border: 1px solid #cfcfcf;
447 | color: #565656;
448 | padding: 0 18px;
449 | display: inline-block;
450 | border-radius: 3px;
451 | margin-left: 10px;
452 | cursor: pointer;
453 | font-size: 14px;
454 | float: left;
455 | -webkit-user-select: none;
456 | -moz-user-select: none;
457 | -ms-user-select: none;
458 | user-select: none;
459 | }
460 | #upload .statusBar .btns .webuploader-pick-hover,
461 | #upload .statusBar .btns .uploadBtn:hover,
462 | #upload .statusBar .btns .uploadBtn.state-uploading:hover,
463 | #upload .statusBar .btns .uploadBtn.state-paused:hover {
464 | background: #f0f0f0;
465 | }
466 |
467 | #upload .statusBar .btns .uploadBtn,
468 | #upload .statusBar .btns .uploadBtn.state-paused{
469 | background: #00b7ee;
470 | color: #fff;
471 | border-color: transparent;
472 | }
473 | #upload .statusBar .btns .uploadBtn:hover,
474 | #upload .statusBar .btns .uploadBtn.state-paused:hover{
475 | background: #00a2d4;
476 | }
477 |
478 | #upload .statusBar .btns .uploadBtn.disabled {
479 | pointer-events: none;
480 | filter:alpha(opacity=60);
481 | -moz-opacity:0.6;
482 | -khtml-opacity: 0.6;
483 | opacity: 0.6;
484 | }
485 |
486 |
487 |
488 | /* 图片管理样式 */
489 | #online {
490 | width: 100%;
491 | height: 336px;
492 | padding: 10px 0 0 0;
493 | }
494 | #online #fileList{
495 | width: 100%;
496 | height: 100%;
497 | overflow-x: hidden;
498 | overflow-y: auto;
499 | position: relative;
500 | }
501 | #online ul {
502 | display: block;
503 | list-style: none;
504 | margin: 0;
505 | padding: 0;
506 | }
507 | #online li {
508 | float: left;
509 | display: block;
510 | list-style: none;
511 | padding: 0;
512 | width: 113px;
513 | height: 113px;
514 | margin: 0 0 9px 9px;
515 | *margin: 0 0 6px 6px;
516 | background-color: #eee;
517 | overflow: hidden;
518 | cursor: pointer;
519 | position: relative;
520 | }
521 | #online li.clearFloat {
522 | float: none;
523 | clear: both;
524 | display: block;
525 | width:0;
526 | height:0;
527 | margin: 0;
528 | padding: 0;
529 | }
530 | #online li img {
531 | cursor: pointer;
532 | }
533 | #online li div.file-wrapper {
534 | cursor: pointer;
535 | position: absolute;
536 | display: block;
537 | width: 111px;
538 | height: 111px;
539 | border: 1px solid #eee;
540 | background: url("./images/bg.png") repeat;
541 | }
542 | #online li div span.file-title{
543 | display: block;
544 | padding: 0 3px;
545 | margin: 3px 0 0 0;
546 | font-size: 12px;
547 | height: 13px;
548 | color: #555555;
549 | text-align: center;
550 | width: 107px;
551 | white-space: nowrap;
552 | word-break: break-all;
553 | overflow: hidden;
554 | text-overflow: ellipsis;
555 | }
556 | #online li .icon {
557 | cursor: pointer;
558 | width: 113px;
559 | height: 113px;
560 | position: absolute;
561 | top: 0;
562 | left: 0;
563 | z-index: 2;
564 | border: 0;
565 | background-repeat: no-repeat;
566 | }
567 | #online li .icon:hover {
568 | width: 107px;
569 | height: 107px;
570 | border: 3px solid #1094fa;
571 | }
572 | #online li.selected .icon {
573 | background-image: url(images/success.png);
574 | background-image: url(images/success.gif) \9;
575 | background-position: 75px 75px;
576 | }
577 | #online li.selected .icon:hover {
578 | width: 107px;
579 | height: 107px;
580 | border: 3px solid #1094fa;
581 | background-position: 72px 72px;
582 | }
583 |
584 |
585 | /* 在线文件的文件预览图标 */
586 | i.file-preview {
587 | display: block;
588 | margin: 10px auto;
589 | width: 70px;
590 | height: 70px;
591 | background-image: url("./images/file-icons.png");
592 | background-image: url("./images/file-icons.gif") \9;
593 | background-position: -140px center;
594 | background-repeat: no-repeat;
595 | }
596 | i.file-preview.file-type-dir{
597 | background-position: 0 center;
598 | }
599 | i.file-preview.file-type-file{
600 | background-position: -140px center;
601 | }
602 | i.file-preview.file-type-filelist{
603 | background-position: -210px center;
604 | }
605 | i.file-preview.file-type-zip,
606 | i.file-preview.file-type-rar,
607 | i.file-preview.file-type-7z,
608 | i.file-preview.file-type-tar,
609 | i.file-preview.file-type-gz,
610 | i.file-preview.file-type-bz2{
611 | background-position: -280px center;
612 | }
613 | i.file-preview.file-type-xls,
614 | i.file-preview.file-type-xlsx{
615 | background-position: -350px center;
616 | }
617 | i.file-preview.file-type-doc,
618 | i.file-preview.file-type-docx{
619 | background-position: -420px center;
620 | }
621 | i.file-preview.file-type-ppt,
622 | i.file-preview.file-type-pptx{
623 | background-position: -490px center;
624 | }
625 | i.file-preview.file-type-vsd{
626 | background-position: -560px center;
627 | }
628 | i.file-preview.file-type-pdf{
629 | background-position: -630px center;
630 | }
631 | i.file-preview.file-type-txt,
632 | i.file-preview.file-type-md,
633 | i.file-preview.file-type-json,
634 | i.file-preview.file-type-htm,
635 | i.file-preview.file-type-xml,
636 | i.file-preview.file-type-html,
637 | i.file-preview.file-type-js,
638 | i.file-preview.file-type-css,
639 | i.file-preview.file-type-php,
640 | i.file-preview.file-type-jsp,
641 | i.file-preview.file-type-asp{
642 | background-position: -700px center;
643 | }
644 | i.file-preview.file-type-apk{
645 | background-position: -770px center;
646 | }
647 | i.file-preview.file-type-exe{
648 | background-position: -840px center;
649 | }
650 | i.file-preview.file-type-ipa{
651 | background-position: -910px center;
652 | }
653 | i.file-preview.file-type-mp4,
654 | i.file-preview.file-type-swf,
655 | i.file-preview.file-type-mkv,
656 | i.file-preview.file-type-avi,
657 | i.file-preview.file-type-flv,
658 | i.file-preview.file-type-mov,
659 | i.file-preview.file-type-mpg,
660 | i.file-preview.file-type-mpeg,
661 | i.file-preview.file-type-ogv,
662 | i.file-preview.file-type-webm,
663 | i.file-preview.file-type-rm,
664 | i.file-preview.file-type-rmvb{
665 | background-position: -980px center;
666 | }
667 | i.file-preview.file-type-ogg,
668 | i.file-preview.file-type-wav,
669 | i.file-preview.file-type-wmv,
670 | i.file-preview.file-type-mid,
671 | i.file-preview.file-type-mp3{
672 | background-position: -1050px center;
673 | }
674 | i.file-preview.file-type-jpg,
675 | i.file-preview.file-type-jpeg,
676 | i.file-preview.file-type-gif,
677 | i.file-preview.file-type-bmp,
678 | i.file-preview.file-type-png,
679 | i.file-preview.file-type-psd{
680 | background-position: -140px center;
681 | }
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/attachment.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ueditor图片对话框
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | 0%
32 |
33 |
34 |
38 |
39 |
44 |
47 |
48 |
49 |
50 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_default.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/alignicon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/alignicon.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/alignicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/alignicon.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/bg.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/file-icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/file-icons.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/file-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/file-icons.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/icons.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/icons.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/image.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/progress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/progress.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/success.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/success.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/attachment/images/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/attachment/images/success.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/emotion.css:
--------------------------------------------------------------------------------
1 | .jd img{
2 | background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
3 | cursor:pointer;width:35px;height:35px;display:block;
4 | }
5 | .pp img{
6 | background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
7 | cursor:pointer;width:25px;height:25px;display:block;
8 | }
9 | .ldw img{
10 | background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
11 | cursor:pointer;width:35px;height:35px;display:block;
12 | }
13 | .tsj img{
14 | background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
15 | cursor:pointer;width:35px;height:35px;display:block;
16 | }
17 | .cat img{
18 | background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
19 | cursor:pointer;width:35px;height:35px;display:block;
20 | }
21 | .bb img{
22 | background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
23 | cursor:pointer;width:35px;height:35px;display:block;
24 | }
25 | .youa img{
26 | background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
27 | cursor:pointer;width:35px;height:35px;display:block;
28 | }
29 |
30 | .smileytable td {height: 37px;}
31 | #tabPanel{margin-left:5px;overflow: hidden;}
32 | #tabContent {float:left;background:#FFFFFF;}
33 | #tabContent div{display: none;width:480px;overflow:hidden;}
34 | #tabIconReview.show{left:17px;display:block;}
35 | .menuFocus{background:#ACCD3C;}
36 | .menuDefault{background:#FFFFFF;}
37 | #tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
38 | img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
39 |
40 | .wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
41 | .tabbody table{width: 100%;}
42 | .tabbody td{border:1px solid #BAC498;}
43 | .tabbody td span{display: block;zoom:1;padding:0 4px;}
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/emotion.html:
--------------------------------------------------------------------------------
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 |
28 |
29 |
30 |
31 |
32 |

33 |
34 |
35 |
53 |
54 |
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/emotion.js:
--------------------------------------------------------------------------------
1 | window.onload = function () {
2 | editor.setOpt({
3 | emotionLocalization:false
4 | });
5 |
6 | emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
7 | emotion.SmileyBox = createTabList( emotion.tabNum );
8 | emotion.tabExist = createArr( emotion.tabNum );
9 |
10 | initImgName();
11 | initEvtHandler( "tabHeads" );
12 | };
13 |
14 | function initImgName() {
15 | for ( var pro in emotion.SmilmgName ) {
16 | var tempName = emotion.SmilmgName[pro],
17 | tempBox = emotion.SmileyBox[pro],
18 | tempStr = "";
19 |
20 | if ( tempBox.length ) return;
21 | for ( var i = 1; i <= tempName[1]; i++ ) {
22 | tempStr = tempName[0];
23 | if ( i < 10 ) tempStr = tempStr + '0';
24 | tempStr = tempStr + i + '.gif';
25 | tempBox.push( tempStr );
26 | }
27 | }
28 | }
29 |
30 | function initEvtHandler( conId ) {
31 | var tabHeads = $G( conId );
32 | for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
33 | var tabObj = tabHeads.childNodes[i];
34 | if ( tabObj.nodeType == 1 ) {
35 | domUtils.on( tabObj, "click", (function ( index ) {
36 | return function () {
37 | switchTab( index );
38 | };
39 | })( j ) );
40 | j++;
41 | }
42 | }
43 | switchTab( 0 );
44 | $G( "tabIconReview" ).style.display = 'none';
45 | }
46 |
47 | function InsertSmiley( url, evt ) {
48 | var obj = {
49 | src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
50 | };
51 | obj._src = obj.src;
52 | editor.execCommand( 'insertimage', obj );
53 | if ( !evt.ctrlKey ) {
54 | dialog.popup.hide();
55 | }
56 | }
57 |
58 | function switchTab( index ) {
59 |
60 | autoHeight( index );
61 | if ( emotion.tabExist[index] == 0 ) {
62 | emotion.tabExist[index] = 1;
63 | createTab( 'tab' + index );
64 | }
65 | //获取呈现元素句柄数组
66 | var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
67 | tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
68 | i = 0, L = tabHeads.length;
69 | //隐藏所有呈现元素
70 | for ( ; i < L; i++ ) {
71 | tabHeads[i].className = "";
72 | tabBodys[i].style.display = "none";
73 | }
74 | //显示对应呈现元素
75 | tabHeads[index].className = "focus";
76 | tabBodys[index].style.display = "block";
77 | }
78 |
79 | function autoHeight( index ) {
80 | var iframe = dialog.getDom( "iframe" ),
81 | parent = iframe.parentNode.parentNode;
82 | switch ( index ) {
83 | case 0:
84 | iframe.style.height = "380px";
85 | parent.style.height = "392px";
86 | break;
87 | case 1:
88 | iframe.style.height = "220px";
89 | parent.style.height = "232px";
90 | break;
91 | case 2:
92 | iframe.style.height = "260px";
93 | parent.style.height = "272px";
94 | break;
95 | case 3:
96 | iframe.style.height = "300px";
97 | parent.style.height = "312px";
98 | break;
99 | case 4:
100 | iframe.style.height = "140px";
101 | parent.style.height = "152px";
102 | break;
103 | case 5:
104 | iframe.style.height = "260px";
105 | parent.style.height = "272px";
106 | break;
107 | case 6:
108 | iframe.style.height = "230px";
109 | parent.style.height = "242px";
110 | break;
111 | default:
112 |
113 | }
114 | }
115 |
116 |
117 | function createTab( tabName ) {
118 | var faceVersion = "?v=1.1", //版本号
119 | tab = $G( tabName ), //获取将要生成的Div句柄
120 | imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
121 | positionLine = 11 / 2, //中间数
122 | iWidth = iHeight = 35, //图片长宽
123 | iColWidth = 3, //表格剩余空间的显示比例
124 | tableCss = emotion.imageCss[tabName],
125 | cssOffset = emotion.imageCssOffset[tabName],
126 | textHTML = [''],
127 | i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
128 | sUrl, realUrl, posflag, offset, infor;
129 |
130 | for ( ; i < imgNum; ) {
131 | textHTML.push( '' );
132 | for ( var j = 0; j < imgColNum; j++, i++ ) {
133 | faceImage = emotion.SmileyBox[tabName][i];
134 | if ( faceImage ) {
135 | sUrl = imagePath + faceImage + faceVersion;
136 | realUrl = imagePath + faceImage;
137 | posflag = j < positionLine ? 0 : 1;
138 | offset = cssOffset * i * (-1) - 1;
139 | infor = emotion.SmileyInfor[tabName][i];
140 |
141 | textHTML.push( '' );
142 | textHTML.push( '' );
143 | textHTML.push( ' ' );
144 | textHTML.push( '' );
145 | } else {
146 | textHTML.push( ' | ' );
147 | }
148 | textHTML.push( ' | ' );
149 | }
150 | textHTML.push( '
' );
151 | }
152 | textHTML.push( '
' );
153 | textHTML = textHTML.join( "" );
154 | tab.innerHTML = textHTML;
155 | }
156 |
157 | function over( td, srcPath, posFlag ) {
158 | td.style.backgroundColor = "#ACCD3C";
159 | $G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
160 | if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
161 | $G( "tabIconReview" ).style.display = 'block';
162 | }
163 |
164 | function out( td ) {
165 | td.style.backgroundColor = "transparent";
166 | var tabIconRevew = $G( "tabIconReview" );
167 | tabIconRevew.className = "";
168 | tabIconRevew.style.display = 'none';
169 | }
170 |
171 | function createTabList( tabNum ) {
172 | var obj = {};
173 | for ( var i = 0; i < tabNum; i++ ) {
174 | obj["tab" + i] = [];
175 | }
176 | return obj;
177 | }
178 |
179 | function createArr( tabNum ) {
180 | var arr = [];
181 | for ( var i = 0; i < tabNum; i++ ) {
182 | arr[i] = 0;
183 | }
184 | return arr;
185 | }
186 |
187 |
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/0.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/bface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/bface.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/cface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/cface.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/fface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/fface.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/jxface2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/jxface2.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/neweditor-tab-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/neweditor-tab-bg.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/tface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/tface.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/wface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/wface.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/emotion/images/yface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/emotion/images/yface.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/help/help.css:
--------------------------------------------------------------------------------
1 | .wrapper{width: 370px;margin: 10px auto;zoom: 1;}
2 | .tabbody{height: 360px;}
3 | .tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;}
4 | .tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;}
5 | .tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;}
6 | .tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;}
7 | .tabbody table thead{font-weight: bold;line-height: 25px;}
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/help/help.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | 帮助
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
UEditor
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | |
27 | |
28 |
29 |
30 |
31 |
32 | ctrl+b |
33 | |
34 |
35 |
36 | ctrl+c |
37 | |
38 |
39 |
40 | ctrl+x |
41 | |
42 |
43 |
44 | ctrl+v |
45 | |
46 |
47 |
48 | ctrl+y |
49 | |
50 |
51 |
52 | ctrl+z |
53 | |
54 |
55 |
56 | ctrl+i |
57 | |
58 |
59 |
60 | ctrl+u |
61 | |
62 |
63 |
64 | ctrl+a |
65 | |
66 |
67 |
68 | shift+enter |
69 | |
70 |
71 |
72 | alt+z |
73 | |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/help/help.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: xuheng
4 | * Date: 12-9-26
5 | * Time: 下午1:06
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | /**
9 | * tab点击处理事件
10 | * @param tabHeads
11 | * @param tabBodys
12 | * @param obj
13 | */
14 | function clickHandler( tabHeads,tabBodys,obj ) {
15 | //head样式更改
16 | for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
17 | tabHeads[k].className = "";
18 | }
19 | obj.className = "focus";
20 | //body显隐
21 | var tabSrc = obj.getAttribute( "tabSrc" );
22 | for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
23 | var body = tabBodys[j],
24 | id = body.getAttribute( "id" );
25 | body.onclick = function(){
26 | this.style.zoom = 1;
27 | };
28 | if ( id != tabSrc ) {
29 | body.style.zIndex = 1;
30 | } else {
31 | body.style.zIndex = 200;
32 | }
33 | }
34 |
35 | }
36 |
37 | /**
38 | * TAB切换
39 | * @param tabParentId tab的父节点ID或者对象本身
40 | */
41 | function switchTab( tabParentId ) {
42 | var tabElements = $G( tabParentId ).children,
43 | tabHeads = tabElements[0].children,
44 | tabBodys = tabElements[1].children;
45 |
46 | for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
47 | var head = tabHeads[i];
48 | if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
49 | head.onclick = function () {
50 | clickHandler(tabHeads,tabBodys,this);
51 | }
52 | }
53 | }
54 | switchTab("helptab");
55 |
56 | document.getElementById('version').innerHTML = parent.UE.version;
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/image.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | /* dialog样式 */
3 | .wrapper {
4 | zoom: 1;
5 | width: 630px;
6 | *width: 626px;
7 | height: 380px;
8 | margin: 0 auto;
9 | padding: 10px;
10 | position: relative;
11 | font-family: sans-serif;
12 | }
13 |
14 | /*tab样式框大小*/
15 | .tabhead {
16 | float:left;
17 | }
18 | .tabbody {
19 | width: 100%;
20 | height: 346px;
21 | position: relative;
22 | clear: both;
23 | }
24 |
25 | .tabbody .panel {
26 | position: absolute;
27 | width: 0;
28 | height: 0;
29 | background: #fff;
30 | overflow: hidden;
31 | display: none;
32 | }
33 |
34 | .tabbody .panel.focus {
35 | width: 100%;
36 | height: 346px;
37 | display: block;
38 | }
39 |
40 | /* 图片对齐方式 */
41 | .alignBar{
42 | float:right;
43 | margin-top: 5px;
44 | position: relative;
45 | }
46 |
47 | .alignBar .algnLabel{
48 | float:left;
49 | height: 20px;
50 | line-height: 20px;
51 | }
52 |
53 | .alignBar #alignIcon{
54 | zoom:1;
55 | _display: inline;
56 | display: inline-block;
57 | position: relative;
58 | }
59 | .alignBar #alignIcon span{
60 | float: left;
61 | cursor: pointer;
62 | display: block;
63 | width: 19px;
64 | height: 17px;
65 | margin-right: 3px;
66 | margin-left: 3px;
67 | background-image: url(images/alignicon.jpg);
68 | }
69 | .alignBar #alignIcon .none-align{
70 | background-position: 0 -18px;
71 | }
72 | .alignBar #alignIcon .left-align{
73 | background-position: -20px -18px;
74 | }
75 | .alignBar #alignIcon .right-align{
76 | background-position: -40px -18px;
77 | }
78 | .alignBar #alignIcon .center-align{
79 | background-position: -60px -18px;
80 | }
81 | .alignBar #alignIcon .none-align.focus{
82 | background-position: 0 0;
83 | }
84 | .alignBar #alignIcon .left-align.focus{
85 | background-position: -20px 0;
86 | }
87 | .alignBar #alignIcon .right-align.focus{
88 | background-position: -40px 0;
89 | }
90 | .alignBar #alignIcon .center-align.focus{
91 | background-position: -60px 0;
92 | }
93 |
94 |
95 |
96 |
97 | /* 远程图片样式 */
98 | #remote {
99 | z-index: 200;
100 | }
101 |
102 | #remote .top{
103 | width: 100%;
104 | margin-top: 25px;
105 | }
106 | #remote .left{
107 | display: block;
108 | float: left;
109 | width: 300px;
110 | height:10px;
111 | }
112 | #remote .right{
113 | display: block;
114 | float: right;
115 | width: 300px;
116 | height:10px;
117 | }
118 | #remote .row{
119 | margin-left: 20px;
120 | clear: both;
121 | height: 40px;
122 | }
123 |
124 | #remote .row label{
125 | text-align: center;
126 | width: 50px;
127 | zoom:1;
128 | _display: inline;
129 | display:inline-block;
130 | vertical-align: middle;
131 | }
132 | #remote .row label.algnLabel{
133 | float: left;
134 |
135 | }
136 |
137 | #remote input.text{
138 | width: 150px;
139 | padding: 3px 6px;
140 | font-size: 14px;
141 | line-height: 1.42857143;
142 | color: #555;
143 | background-color: #fff;
144 | background-image: none;
145 | border: 1px solid #ccc;
146 | border-radius: 4px;
147 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
148 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
149 | -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
150 | transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
151 | }
152 | #remote input.text:focus {
153 | border-color: #66afe9;
154 | outline: 0;
155 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
156 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
157 | }
158 | #remote #url{
159 | width: 500px;
160 | margin-bottom: 2px;
161 | }
162 | #remote #width,
163 | #remote #height{
164 | width: 20px;
165 | margin-left: 2px;
166 | margin-right: 2px;
167 | }
168 | #remote #border,
169 | #remote #vhSpace,
170 | #remote #title{
171 | width: 180px;
172 | margin-right: 5px;
173 | }
174 | #remote #lock{
175 | }
176 | #remote #lockicon{
177 | zoom: 1;
178 | _display:inline;
179 | display: inline-block;
180 | width: 20px;
181 | height: 20px;
182 | background: url("../../themes/default/images/lock.gif") -13px -13px no-repeat;
183 | vertical-align: middle;
184 | }
185 | #remote #preview{
186 | clear: both;
187 | width: 260px;
188 | height: 240px;
189 | z-index: 9999;
190 | margin-top: 10px;
191 | background-color: #eee;
192 | overflow: hidden;
193 | }
194 |
195 | /* 上传图片 */
196 | .tabbody #upload.panel {
197 | width: 0;
198 | height: 0;
199 | overflow: hidden;
200 | position: absolute !important;
201 | clip: rect(1px, 1px, 1px, 1px);
202 | background: #fff;
203 | display: block;
204 | }
205 |
206 | .tabbody #upload.panel.focus {
207 | width: 100%;
208 | height: 346px;
209 | display: block;
210 | clip: auto;
211 | }
212 |
213 | #upload .queueList {
214 | margin: 0;
215 | width: 100%;
216 | height: 100%;
217 | position: absolute;
218 | overflow: hidden;
219 | }
220 |
221 | #upload p {
222 | margin: 0;
223 | }
224 |
225 | .element-invisible {
226 | width: 0 !important;
227 | height: 0 !important;
228 | border: 0;
229 | padding: 0;
230 | margin: 0;
231 | overflow: hidden;
232 | position: absolute !important;
233 | clip: rect(1px, 1px, 1px, 1px);
234 | }
235 |
236 | #upload .placeholder {
237 | margin: 10px;
238 | border: 2px dashed #e6e6e6;
239 | *border: 0px dashed #e6e6e6;
240 | height: 172px;
241 | padding-top: 150px;
242 | text-align: center;
243 | background: url(images/image.png) center 70px no-repeat;
244 | color: #cccccc;
245 | font-size: 18px;
246 | position: relative;
247 | top:0;
248 | *top: 10px;
249 | }
250 |
251 | #upload .placeholder .webuploader-pick {
252 | font-size: 18px;
253 | background: #00b7ee;
254 | border-radius: 3px;
255 | line-height: 44px;
256 | padding: 0 30px;
257 | *width: 120px;
258 | color: #fff;
259 | display: inline-block;
260 | margin: 0 auto 20px auto;
261 | cursor: pointer;
262 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
263 | }
264 |
265 | #upload .placeholder .webuploader-pick-hover {
266 | background: #00a2d4;
267 | }
268 |
269 |
270 | #filePickerContainer {
271 | text-align: center;
272 | }
273 |
274 | #upload .placeholder .flashTip {
275 | color: #666666;
276 | font-size: 12px;
277 | position: absolute;
278 | width: 100%;
279 | text-align: center;
280 | bottom: 20px;
281 | }
282 |
283 | #upload .placeholder .flashTip a {
284 | color: #0785d1;
285 | text-decoration: none;
286 | }
287 |
288 | #upload .placeholder .flashTip a:hover {
289 | text-decoration: underline;
290 | }
291 |
292 | #upload .placeholder.webuploader-dnd-over {
293 | border-color: #999999;
294 | }
295 |
296 | #upload .filelist {
297 | list-style: none;
298 | margin: 0;
299 | padding: 0;
300 | overflow-x: hidden;
301 | overflow-y: auto;
302 | position: relative;
303 | height: 300px;
304 | }
305 |
306 | #upload .filelist:after {
307 | content: '';
308 | display: block;
309 | width: 0;
310 | height: 0;
311 | overflow: hidden;
312 | clear: both;
313 | position: relative;
314 | }
315 |
316 | #upload .filelist li {
317 | width: 113px;
318 | height: 113px;
319 | background: url(images/bg.png);
320 | text-align: center;
321 | margin: 9px 0 0 9px;
322 | *margin: 6px 0 0 6px;
323 | position: relative;
324 | display: block;
325 | float: left;
326 | overflow: hidden;
327 | font-size: 12px;
328 | }
329 |
330 | #upload .filelist li p.log {
331 | position: relative;
332 | top: -45px;
333 | }
334 |
335 | #upload .filelist li p.title {
336 | position: absolute;
337 | top: 0;
338 | left: 0;
339 | width: 100%;
340 | overflow: hidden;
341 | white-space: nowrap;
342 | text-overflow: ellipsis;
343 | top: 5px;
344 | text-indent: 5px;
345 | text-align: left;
346 | }
347 |
348 | #upload .filelist li p.progress {
349 | position: absolute;
350 | width: 100%;
351 | bottom: 0;
352 | left: 0;
353 | height: 8px;
354 | overflow: hidden;
355 | z-index: 50;
356 | margin: 0;
357 | border-radius: 0;
358 | background: none;
359 | -webkit-box-shadow: 0 0 0;
360 | }
361 |
362 | #upload .filelist li p.progress span {
363 | display: none;
364 | overflow: hidden;
365 | width: 0;
366 | height: 100%;
367 | background: #1483d8 url(images/progress.png) repeat-x;
368 |
369 | -webit-transition: width 200ms linear;
370 | -moz-transition: width 200ms linear;
371 | -o-transition: width 200ms linear;
372 | -ms-transition: width 200ms linear;
373 | transition: width 200ms linear;
374 |
375 | -webkit-animation: progressmove 2s linear infinite;
376 | -moz-animation: progressmove 2s linear infinite;
377 | -o-animation: progressmove 2s linear infinite;
378 | -ms-animation: progressmove 2s linear infinite;
379 | animation: progressmove 2s linear infinite;
380 |
381 | -webkit-transform: translateZ(0);
382 | }
383 |
384 | @-webkit-keyframes progressmove {
385 | 0% {
386 | background-position: 0 0;
387 | }
388 | 100% {
389 | background-position: 17px 0;
390 | }
391 | }
392 |
393 | @-moz-keyframes progressmove {
394 | 0% {
395 | background-position: 0 0;
396 | }
397 | 100% {
398 | background-position: 17px 0;
399 | }
400 | }
401 |
402 | @keyframes progressmove {
403 | 0% {
404 | background-position: 0 0;
405 | }
406 | 100% {
407 | background-position: 17px 0;
408 | }
409 | }
410 |
411 | #upload .filelist li p.imgWrap {
412 | position: relative;
413 | z-index: 2;
414 | line-height: 113px;
415 | vertical-align: middle;
416 | overflow: hidden;
417 | width: 113px;
418 | height: 113px;
419 |
420 | -webkit-transform-origin: 50% 50%;
421 | -moz-transform-origin: 50% 50%;
422 | -o-transform-origin: 50% 50%;
423 | -ms-transform-origin: 50% 50%;
424 | transform-origin: 50% 50%;
425 |
426 | -webit-transition: 200ms ease-out;
427 | -moz-transition: 200ms ease-out;
428 | -o-transition: 200ms ease-out;
429 | -ms-transition: 200ms ease-out;
430 | transition: 200ms ease-out;
431 | }
432 |
433 | #upload .filelist li img {
434 | width: 100%;
435 | }
436 |
437 | #upload .filelist li p.error {
438 | background: #f43838;
439 | color: #fff;
440 | position: absolute;
441 | bottom: 0;
442 | left: 0;
443 | height: 28px;
444 | line-height: 28px;
445 | width: 100%;
446 | z-index: 100;
447 | display:none;
448 | }
449 |
450 | #upload .filelist li .success {
451 | display: block;
452 | position: absolute;
453 | left: 0;
454 | bottom: 0;
455 | height: 40px;
456 | width: 100%;
457 | z-index: 200;
458 | background: url(images/success.png) no-repeat right bottom;
459 | background: url(images/success.gif) no-repeat right bottom \9;
460 | }
461 |
462 | #upload .filelist li.filePickerBlock {
463 | width: 113px;
464 | height: 113px;
465 | background: url(images/image.png) no-repeat center 12px;
466 | border: 1px solid #eeeeee;
467 | border-radius: 0;
468 | }
469 | #upload .filelist li.filePickerBlock div.webuploader-pick {
470 | width: 100%;
471 | height: 100%;
472 | margin: 0;
473 | padding: 0;
474 | opacity: 0;
475 | background: none;
476 | font-size: 0;
477 | }
478 |
479 | #upload .filelist div.file-panel {
480 | position: absolute;
481 | height: 0;
482 | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
483 | background: rgba(0, 0, 0, 0.5);
484 | width: 100%;
485 | top: 0;
486 | left: 0;
487 | overflow: hidden;
488 | z-index: 300;
489 | }
490 |
491 | #upload .filelist div.file-panel span {
492 | width: 24px;
493 | height: 24px;
494 | display: inline;
495 | float: right;
496 | text-indent: -9999px;
497 | overflow: hidden;
498 | background: url(images/icons.png) no-repeat;
499 | background: url(images/icons.gif) no-repeat \9;
500 | margin: 5px 1px 1px;
501 | cursor: pointer;
502 | -webkit-tap-highlight-color: rgba(0,0,0,0);
503 | -webkit-user-select: none;
504 | -moz-user-select: none;
505 | -ms-user-select: none;
506 | user-select: none;
507 | }
508 |
509 | #upload .filelist div.file-panel span.rotateLeft {
510 | display:none;
511 | background-position: 0 -24px;
512 | }
513 |
514 | #upload .filelist div.file-panel span.rotateLeft:hover {
515 | background-position: 0 0;
516 | }
517 |
518 | #upload .filelist div.file-panel span.rotateRight {
519 | display:none;
520 | background-position: -24px -24px;
521 | }
522 |
523 | #upload .filelist div.file-panel span.rotateRight:hover {
524 | background-position: -24px 0;
525 | }
526 |
527 | #upload .filelist div.file-panel span.cancel {
528 | background-position: -48px -24px;
529 | }
530 |
531 | #upload .filelist div.file-panel span.cancel:hover {
532 | background-position: -48px 0;
533 | }
534 |
535 | #upload .statusBar {
536 | height: 45px;
537 | border-bottom: 1px solid #dadada;
538 | margin: 0 10px;
539 | padding: 0;
540 | line-height: 45px;
541 | vertical-align: middle;
542 | position: relative;
543 | }
544 |
545 | #upload .statusBar .progress {
546 | border: 1px solid #1483d8;
547 | width: 198px;
548 | background: #fff;
549 | height: 18px;
550 | position: absolute;
551 | top: 12px;
552 | display: none;
553 | text-align: center;
554 | line-height: 18px;
555 | color: #6dbfff;
556 | margin: 0 10px 0 0;
557 | }
558 | #upload .statusBar .progress span.percentage {
559 | width: 0;
560 | height: 100%;
561 | left: 0;
562 | top: 0;
563 | background: #1483d8;
564 | position: absolute;
565 | }
566 | #upload .statusBar .progress span.text {
567 | position: relative;
568 | z-index: 10;
569 | }
570 |
571 | #upload .statusBar .info {
572 | display: inline-block;
573 | font-size: 14px;
574 | color: #666666;
575 | }
576 |
577 | #upload .statusBar .btns {
578 | position: absolute;
579 | top: 7px;
580 | right: 0;
581 | line-height: 30px;
582 | }
583 |
584 | #filePickerBtn {
585 | display: inline-block;
586 | float: left;
587 | }
588 | #upload .statusBar .btns .webuploader-pick,
589 | #upload .statusBar .btns .uploadBtn,
590 | #upload .statusBar .btns .uploadBtn.state-uploading,
591 | #upload .statusBar .btns .uploadBtn.state-paused {
592 | background: #ffffff;
593 | border: 1px solid #cfcfcf;
594 | color: #565656;
595 | padding: 0 18px;
596 | display: inline-block;
597 | border-radius: 3px;
598 | margin-left: 10px;
599 | cursor: pointer;
600 | font-size: 14px;
601 | float: left;
602 | -webkit-user-select: none;
603 | -moz-user-select: none;
604 | -ms-user-select: none;
605 | user-select: none;
606 | }
607 | #upload .statusBar .btns .webuploader-pick-hover,
608 | #upload .statusBar .btns .uploadBtn:hover,
609 | #upload .statusBar .btns .uploadBtn.state-uploading:hover,
610 | #upload .statusBar .btns .uploadBtn.state-paused:hover {
611 | background: #f0f0f0;
612 | }
613 |
614 | #upload .statusBar .btns .uploadBtn,
615 | #upload .statusBar .btns .uploadBtn.state-paused{
616 | background: #00b7ee;
617 | color: #fff;
618 | border-color: transparent;
619 | }
620 | #upload .statusBar .btns .uploadBtn:hover,
621 | #upload .statusBar .btns .uploadBtn.state-paused:hover{
622 | background: #00a2d4;
623 | }
624 |
625 | #upload .statusBar .btns .uploadBtn.disabled {
626 | pointer-events: none;
627 | filter:alpha(opacity=60);
628 | -moz-opacity:0.6;
629 | -khtml-opacity: 0.6;
630 | opacity: 0.6;
631 | }
632 |
633 |
634 |
635 | /* 图片管理样式 */
636 | #online {
637 | width: 100%;
638 | height: 336px;
639 | padding: 10px 0 0 0;
640 | }
641 | #online #imageList{
642 | width: 100%;
643 | height: 100%;
644 | overflow-x: hidden;
645 | overflow-y: auto;
646 | position: relative;
647 | }
648 | #online ul {
649 | display: block;
650 | list-style: none;
651 | margin: 0;
652 | padding: 0;
653 | }
654 | #online li {
655 | float: left;
656 | display: block;
657 | list-style: none;
658 | padding: 0;
659 | width: 113px;
660 | height: 113px;
661 | margin: 0 0 9px 9px;
662 | *margin: 0 0 6px 6px;
663 | background-color: #eee;
664 | overflow: hidden;
665 | cursor: pointer;
666 | position: relative;
667 | }
668 | #online li.clearFloat {
669 | float: none;
670 | clear: both;
671 | display: block;
672 | width:0;
673 | height:0;
674 | margin: 0;
675 | padding: 0;
676 | }
677 | #online li img {
678 | cursor: pointer;
679 | }
680 | #online li .icon {
681 | cursor: pointer;
682 | width: 113px;
683 | height: 113px;
684 | position: absolute;
685 | top: 0;
686 | left: 0;
687 | z-index: 2;
688 | border: 0;
689 | background-repeat: no-repeat;
690 | }
691 | #online li .icon:hover {
692 | width: 107px;
693 | height: 107px;
694 | border: 3px solid #1094fa;
695 | }
696 | #online li.selected .icon {
697 | background-image: url(images/success.png);
698 | background-image: url(images/success.gif)\9;
699 | background-position: 75px 75px;
700 | }
701 | #online li.selected .icon:hover {
702 | width: 107px;
703 | height: 107px;
704 | border: 3px solid #1094fa;
705 | background-position: 72px 72px;
706 | }
707 |
708 |
709 | /* 图片搜索样式 */
710 | #search .searchBar {
711 | width: 100%;
712 | height: 30px;
713 | margin: 10px 0 5px 0;
714 | padding: 0;
715 | }
716 |
717 | #search input.text{
718 | width: 150px;
719 | padding: 3px 6px;
720 | font-size: 14px;
721 | line-height: 1.42857143;
722 | color: #555;
723 | background-color: #fff;
724 | background-image: none;
725 | border: 1px solid #ccc;
726 | border-radius: 4px;
727 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
728 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
729 | -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
730 | transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
731 | }
732 | #search input.text:focus {
733 | border-color: #66afe9;
734 | outline: 0;
735 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
736 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
737 | }
738 | #search input.searchTxt {
739 | margin-left:5px;
740 | padding-left: 5px;
741 | background: #FFF;
742 | width: 300px;
743 | *width: 260px;
744 | height: 21px;
745 | line-height: 21px;
746 | float: left;
747 | dislay: block;
748 | }
749 |
750 | #search .searchType {
751 | width: 65px;
752 | height: 28px;
753 | padding:0;
754 | line-height: 28px;
755 | border: 1px solid #d7d7d7;
756 | border-radius: 0;
757 | vertical-align: top;
758 | margin-left: 5px;
759 | float: left;
760 | dislay: block;
761 | }
762 |
763 | #search #searchBtn,
764 | #search #searchReset {
765 | display: inline-block;
766 | margin-bottom: 0;
767 | margin-right: 5px;
768 | padding: 4px 10px;
769 | font-weight: 400;
770 | text-align: center;
771 | vertical-align: middle;
772 | cursor: pointer;
773 | background-image: none;
774 | border: 1px solid transparent;
775 | white-space: nowrap;
776 | font-size: 14px;
777 | border-radius: 4px;
778 | -webkit-user-select: none;
779 | -moz-user-select: none;
780 | -ms-user-select: none;
781 | user-select: none;
782 | vertical-align: top;
783 | float: right;
784 | }
785 |
786 | #search #searchBtn {
787 | color: white;
788 | border-color: #285e8e;
789 | background-color: #3b97d7;
790 | }
791 | #search #searchReset {
792 | color: #333;
793 | border-color: #ccc;
794 | background-color: #fff;
795 | }
796 | #search #searchBtn:hover {
797 | background-color: #3276b1;
798 | }
799 | #search #searchReset:hover {
800 | background-color: #eee;
801 | }
802 |
803 | #search .msg {
804 | margin-left: 5px;
805 | }
806 |
807 | #search .searchList{
808 | width: 100%;
809 | height: 300px;
810 | overflow: hidden;
811 | clear: both;
812 | }
813 | #search .searchList ul{
814 | margin:0;
815 | padding:0;
816 | list-style:none;
817 | clear: both;
818 | width: 100%;
819 | height: 100%;
820 | overflow-x: hidden;
821 | overflow-y: auto;
822 | zoom: 1;
823 | position: relative;
824 | }
825 |
826 | #search .searchList li {
827 | list-style:none;
828 | float: left;
829 | display: block;
830 | width: 115px;
831 | margin: 5px 10px 5px 20px;
832 | *margin: 5px 10px 5px 15px;
833 | padding:0;
834 | font-size: 12px;
835 | box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
836 | -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
837 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
838 | position: relative;
839 | vertical-align: top;
840 | text-align: center;
841 | overflow: hidden;
842 | cursor: pointer;
843 | filter: alpha(Opacity=100);
844 | -moz-opacity: 1;
845 | opacity: 1;
846 | border: 2px solid #eee;
847 | }
848 |
849 | #search .searchList li.selected {
850 | filter: alpha(Opacity=40);
851 | -moz-opacity: 0.4;
852 | opacity: 0.4;
853 | border: 2px solid #00a0e9;
854 | }
855 |
856 | #search .searchList li p {
857 | background-color: #eee;
858 | margin: 0;
859 | padding: 0;
860 | position: relative;
861 | width:100%;
862 | height:115px;
863 | overflow: hidden;
864 | }
865 |
866 | #search .searchList li p img {
867 | cursor: pointer;
868 | border: 0;
869 | }
870 |
871 | #search .searchList li a {
872 | color: #999;
873 | border-top: 1px solid #F2F2F2;
874 | background: #FAFAFA;
875 | text-align: center;
876 | display: block;
877 | padding: 0 5px;
878 | width: 105px;
879 | height:32px;
880 | line-height:32px;
881 | white-space:nowrap;
882 | text-overflow:ellipsis;
883 | text-decoration: none;
884 | overflow: hidden;
885 | word-break: break-all;
886 | }
887 |
888 | #search .searchList a:hover {
889 | text-decoration: underline;
890 | color: #333;
891 | }
892 | #search .searchList .clearFloat{
893 | clear: both;
894 | }
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/image.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ueditor图片对话框
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | 0%
76 |
77 |
78 |
82 |
83 |
88 |
91 |
92 |
93 |
94 |
95 |
98 |
99 |
100 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/alignicon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/alignicon.jpg
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/bg.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/icons.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/icons.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/image.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/progress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/progress.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/success.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/success.gif
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/image/images/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/dialogs/image/images/success.png
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/internal.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | var parent = window.parent;
3 | //dialog对象
4 | dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
5 | //当前打开dialog的编辑器实例
6 | editor = dialog.editor;
7 |
8 | UE = parent.UE;
9 |
10 | domUtils = UE.dom.domUtils;
11 |
12 | utils = UE.utils;
13 |
14 | browser = UE.browser;
15 |
16 | ajax = UE.ajax;
17 |
18 | $G = function ( id ) {
19 | return document.getElementById( id )
20 | };
21 | //focus元素
22 | $focus = function ( node ) {
23 | setTimeout( function () {
24 | if ( browser.ie ) {
25 | var r = node.createTextRange();
26 | r.collapse( false );
27 | r.select();
28 | } else {
29 | node.focus()
30 | }
31 | }, 0 )
32 | };
33 | utils.loadFile(document,{
34 | href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(),
35 | tag:"link",
36 | type:"text/css",
37 | rel:"stylesheet"
38 | });
39 | lang = editor.getLang(dialog.className.split( "-" )[2]);
40 | if(lang){
41 | domUtils.on(window,'load',function () {
42 |
43 | var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
44 | //针对静态资源
45 | for ( var i in lang["static"] ) {
46 | var dom = $G( i );
47 | if(!dom) continue;
48 | var tagName = dom.tagName,
49 | content = lang["static"][i];
50 | if(content.src){
51 | //clone
52 | content = utils.extend({},content,false);
53 | content.src = langImgPath + content.src;
54 | }
55 | if(content.style){
56 | content = utils.extend({},content,false);
57 | content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
58 | }
59 | switch ( tagName.toLowerCase() ) {
60 | case "var":
61 | dom.parentNode.replaceChild( document.createTextNode( content ), dom );
62 | break;
63 | case "select":
64 | var ops = dom.options;
65 | for ( var j = 0, oj; oj = ops[j]; ) {
66 | oj.innerHTML = content.options[j++];
67 | }
68 | for ( var p in content ) {
69 | p != "options" && dom.setAttribute( p, content[p] );
70 | }
71 | break;
72 | default :
73 | domUtils.setAttributes( dom, content);
74 | }
75 | }
76 | } );
77 | }
78 |
79 |
80 | })();
81 |
82 |
--------------------------------------------------------------------------------
/example/public/ueditor/dialogs/link/link.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 |
38 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/example/public/ueditor/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | 完整demo
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
完整demo
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
48 |
50 |
51 |
52 |
156 |
157 |
--------------------------------------------------------------------------------
/example/public/ueditor/lang/zh-cn/images/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/lang/zh-cn/images/copy.png
--------------------------------------------------------------------------------
/example/public/ueditor/lang/zh-cn/images/localimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/lang/zh-cn/images/localimage.png
--------------------------------------------------------------------------------
/example/public/ueditor/lang/zh-cn/images/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/lang/zh-cn/images/music.png
--------------------------------------------------------------------------------
/example/public/ueditor/lang/zh-cn/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/lang/zh-cn/images/upload.png
--------------------------------------------------------------------------------
/example/public/ueditor/nodejs/config.json:
--------------------------------------------------------------------------------
1 | /* 前后端通信相关的配置,注释只允许使用多行方式 */
2 | {
3 | /* 上传图片配置项 */
4 | "imageActionName": "uploadimage", /* 执行上传图片的action名称 */
5 | "imageFieldName": "upfile", /* 提交的图片表单名称 */
6 | "imageMaxSize": 2048000, /* 上传大小限制,单位B */
7 | "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */
8 | "imageCompressEnable": true, /* 是否压缩图片,默认是true */
9 | "imageCompressBorder": 1600, /* 图片压缩最长边限制 */
10 | "imageInsertAlign": "none", /* 插入的图片浮动方式 */
11 | "imageUrlPrefix": "", /* 图片访问路径前缀 */
12 | "imagePathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
13 | /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
14 | /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
15 | /* {time} 会替换成时间戳 */
16 | /* {yyyy} 会替换成四位年份 */
17 | /* {yy} 会替换成两位年份 */
18 | /* {mm} 会替换成两位月份 */
19 | /* {dd} 会替换成两位日期 */
20 | /* {hh} 会替换成两位小时 */
21 | /* {ii} 会替换成两位分钟 */
22 | /* {ss} 会替换成两位秒 */
23 | /* 非法字符 \ : * ? " < > | */
24 | /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */
25 |
26 | /* 涂鸦图片上传配置项 */
27 | "scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */
28 | "scrawlFieldName": "upfile", /* 提交的图片表单名称 */
29 | "scrawlPathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
30 | "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
31 | "scrawlUrlPrefix": "", /* 图片访问路径前缀 */
32 | "scrawlInsertAlign": "none",
33 |
34 | /* 截图工具上传 */
35 | "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
36 | "snapscreenPathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
37 | "snapscreenUrlPrefix": "", /* 图片访问路径前缀 */
38 | "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
39 |
40 | /* 抓取远程图片配置 */
41 | "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"],
42 | "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
43 | "catcherFieldName": "source", /* 提交的图片列表表单名称 */
44 | "catcherPathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
45 | "catcherUrlPrefix": "", /* 图片访问路径前缀 */
46 | "catcherMaxSize": 2048000, /* 上传大小限制,单位B */
47 | "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
48 |
49 | /* 上传视频配置 */
50 | "videoActionName": "uploadvideo", /* 执行上传视频的action名称 */
51 | "videoFieldName": "upfile", /* 提交的视频表单名称 */
52 | "videoPathFormat": "/ueditor/php/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
53 | "videoUrlPrefix": "", /* 视频访问路径前缀 */
54 | "videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */
55 | "videoAllowFiles": [
56 | ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
57 | ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */
58 |
59 | /* 上传文件配置 */
60 | "fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
61 | "fileFieldName": "upfile", /* 提交的文件表单名称 */
62 | "filePathFormat": "/ueditor/php/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
63 | "fileUrlPrefix": "", /* 文件访问路径前缀 */
64 | "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
65 | "fileAllowFiles": [
66 | ".png", ".jpg", ".jpeg", ".gif", ".bmp",
67 | ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
68 | ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
69 | ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
70 | ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
71 | ], /* 上传文件格式显示 */
72 |
73 | /* 列出指定目录下的图片 */
74 | "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
75 | "imageManagerListPath": "/ueditor/php/upload/image/", /* 指定要列出图片的目录 */
76 | "imageManagerListSize": 20, /* 每次列出文件数量 */
77 | "imageManagerUrlPrefix": "", /* 图片访问路径前缀 */
78 | "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
79 | "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
80 |
81 | /* 列出指定目录下的文件 */
82 | "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
83 | "fileManagerListPath": "/ueditor/php/upload/file/", /* 指定要列出文件的目录 */
84 | "fileManagerUrlPrefix": "", /* 文件访问路径前缀 */
85 | "fileManagerListSize": 20, /* 每次列出文件数量 */
86 | "fileManagerAllowFiles": [
87 | ".png", ".jpg", ".jpeg", ".gif", ".bmp",
88 | ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
89 | ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
90 | ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
91 | ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
92 | ] /* 列出的文件类型 */
93 |
94 | }
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/dialogbase.css:
--------------------------------------------------------------------------------
1 | /*弹出对话框页面样式组件
2 | */
3 |
4 | /*reset
5 | */
6 | html, body, div, span, applet, object, iframe,
7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8 | a, abbr, acronym, address, big, cite, code,
9 | del, dfn, em, font, img, ins, kbd, q, s, samp,
10 | small, strike, strong, sub, sup, tt, var,
11 | b, u, i, center,
12 | dl, dt, dd, ol, ul, li,
13 | fieldset, form, label, legend,
14 | table, caption, tbody, tfoot, thead, tr, th, td {
15 | margin: 0;
16 | padding: 0;
17 | outline: 0;
18 | font-size: 100%;
19 | }
20 |
21 | body {
22 | line-height: 1;
23 | }
24 |
25 | ol, ul {
26 | list-style: none;
27 | }
28 |
29 | blockquote, q {
30 | quotes: none;
31 | }
32 |
33 | ins {
34 | text-decoration: none;
35 | }
36 |
37 | del {
38 | text-decoration: line-through;
39 | }
40 |
41 | table {
42 | border-collapse: collapse;
43 | border-spacing: 0;
44 | }
45 |
46 | /*module
47 | */
48 | body {
49 | background-color: #fff;
50 | font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA;
51 | color: #646464;
52 | }
53 |
54 | /*tab*/
55 | .tabhead {
56 | position: relative;
57 | z-index: 10;
58 | }
59 |
60 | .tabhead span {
61 | display: inline-block;
62 | padding: 0 5px;
63 | height: 30px;
64 | border: 1px solid #ccc;
65 | background: url("images/dialog-title-bg.png") repeat-x;
66 | text-align: center;
67 | line-height: 30px;
68 | cursor: pointer;
69 | *margin-right: 5px;
70 | }
71 |
72 | .tabhead span.focus {
73 | height: 31px;
74 | border-bottom: none;
75 | background: #fff;
76 | }
77 |
78 | .tabbody {
79 | position: relative;
80 | top: -1px;
81 | margin: 0 auto;
82 | border: 1px solid #ccc;
83 | }
84 |
85 | /*button*/
86 | a.button {
87 | display: block;
88 | text-align: center;
89 | line-height: 24px;
90 | text-decoration: none;
91 | height: 24px;
92 | width: 95px;
93 | border: 0;
94 | color: #838383;
95 | background: url(../../themes/default/images/icons-all.gif) no-repeat;
96 | }
97 |
98 | a.button:hover {
99 | background-position: 0 -30px;
100 | }
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/anchor.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/anchor.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/arrow.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/arrow_down.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/arrow_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/arrow_up.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/button-bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/button-bg.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/cancelbutton.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/cancelbutton.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/charts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/charts.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/cursor_h.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/cursor_h.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/cursor_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/cursor_h.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/cursor_v.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/cursor_v.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/cursor_v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/cursor_v.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/dialog-title-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/dialog-title-bg.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/filescan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/filescan.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/highlighted.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/highlighted.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/icons-all.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/icons-all.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/icons.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/icons.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/loaderror.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/loaderror.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/loading.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/lock.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/lock.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/neweditor-tab-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/neweditor-tab-bg.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/pagebreak.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/pagebreak.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/scale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/scale.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/sortable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/sortable.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/spacer.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/sparator_v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/sparator_v.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/table-cell-align.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/table-cell-align.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/tangram-colorpicker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/tangram-colorpicker.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/toolbar_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/toolbar_bg.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/unhighlighted.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/unhighlighted.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/upload.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/videologo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/videologo.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/word.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/word.gif
--------------------------------------------------------------------------------
/example/public/ueditor/themes/default/images/wordpaste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/themes/default/images/wordpaste.png
--------------------------------------------------------------------------------
/example/public/ueditor/themes/iframe.css:
--------------------------------------------------------------------------------
1 | /*可以在这里添加你自己的css*/
2 |
--------------------------------------------------------------------------------
/example/public/ueditor/third-party/codemirror/codemirror.css:
--------------------------------------------------------------------------------
1 | .CodeMirror {
2 | line-height: 1em;
3 | font-family: monospace;
4 | }
5 |
6 | .CodeMirror-scroll {
7 | overflow: auto;
8 | height: 300px;
9 | /* This is needed to prevent an IE[67] bug where the scrolled content
10 | is visible outside of the scrolling box. */
11 | position: relative;
12 | }
13 |
14 | .CodeMirror-gutter {
15 | position: absolute; left: 0; top: 0;
16 | z-index: 10;
17 | background-color: #f7f7f7;
18 | border-right: 1px solid #eee;
19 | min-width: 2em;
20 | height: 100%;
21 | }
22 | .CodeMirror-gutter-text {
23 | color: #aaa;
24 | text-align: right;
25 | padding: .4em .2em .4em .4em;
26 | white-space: pre !important;
27 | }
28 | .CodeMirror-lines {
29 | padding: .4em;
30 | }
31 |
32 | .CodeMirror pre {
33 | -moz-border-radius: 0;
34 | -webkit-border-radius: 0;
35 | -o-border-radius: 0;
36 | border-radius: 0;
37 | border-width: 0; margin: 0; padding: 0; background: transparent;
38 | font-family: inherit;
39 | font-size: inherit;
40 | padding: 0; margin: 0;
41 | white-space: pre;
42 | word-wrap: normal;
43 | }
44 |
45 | .CodeMirror-wrap pre {
46 | word-wrap: break-word;
47 | white-space: pre-wrap;
48 | }
49 | .CodeMirror-wrap .CodeMirror-scroll {
50 | overflow-x: hidden;
51 | }
52 |
53 | .CodeMirror textarea {
54 | outline: none !important;
55 | }
56 |
57 | .CodeMirror pre.CodeMirror-cursor {
58 | z-index: 10;
59 | position: absolute;
60 | visibility: hidden;
61 | border-left: 1px solid black;
62 | }
63 | .CodeMirror-focused pre.CodeMirror-cursor {
64 | visibility: visible;
65 | }
66 |
67 | span.CodeMirror-selected { background: #d9d9d9; }
68 | .CodeMirror-focused span.CodeMirror-selected { background: #d2dcf8; }
69 |
70 | .CodeMirror-searching {background: #ffa;}
71 |
72 | /* Default theme */
73 |
74 | .cm-s-default span.cm-keyword {color: #708;}
75 | .cm-s-default span.cm-atom {color: #219;}
76 | .cm-s-default span.cm-number {color: #164;}
77 | .cm-s-default span.cm-def {color: #00f;}
78 | .cm-s-default span.cm-variable {color: black;}
79 | .cm-s-default span.cm-variable-2 {color: #05a;}
80 | .cm-s-default span.cm-variable-3 {color: #085;}
81 | .cm-s-default span.cm-property {color: black;}
82 | .cm-s-default span.cm-operator {color: black;}
83 | .cm-s-default span.cm-comment {color: #a50;}
84 | .cm-s-default span.cm-string {color: #a11;}
85 | .cm-s-default span.cm-string-2 {color: #f50;}
86 | .cm-s-default span.cm-meta {color: #555;}
87 | .cm-s-default span.cm-error {color: #f00;}
88 | .cm-s-default span.cm-qualifier {color: #555;}
89 | .cm-s-default span.cm-builtin {color: #30a;}
90 | .cm-s-default span.cm-bracket {color: #cc7;}
91 | .cm-s-default span.cm-tag {color: #170;}
92 | .cm-s-default span.cm-attribute {color: #00c;}
93 | .cm-s-default span.cm-header {color: #a0a;}
94 | .cm-s-default span.cm-quote {color: #090;}
95 | .cm-s-default span.cm-hr {color: #999;}
96 | .cm-s-default span.cm-link {color: #00c;}
97 |
98 | span.cm-header, span.cm-strong {font-weight: bold;}
99 | span.cm-em {font-style: italic;}
100 | span.cm-emstrong {font-style: italic; font-weight: bold;}
101 | span.cm-link {text-decoration: underline;}
102 |
103 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
104 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
105 |
--------------------------------------------------------------------------------
/example/public/ueditor/third-party/webuploader/Uploader.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/public/ueditor/third-party/webuploader/Uploader.swf
--------------------------------------------------------------------------------
/example/public/ueditor/third-party/webuploader/webuploader.css:
--------------------------------------------------------------------------------
1 | .webuploader-container {
2 | position: relative;
3 | }
4 | .webuploader-element-invisible {
5 | position: absolute !important;
6 | clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
7 | clip: rect(1px,1px,1px,1px);
8 | }
9 | .webuploader-pick {
10 | position: relative;
11 | display: inline-block;
12 | cursor: pointer;
13 | background: #00b7ee;
14 | padding: 10px 15px;
15 | color: #fff;
16 | text-align: center;
17 | border-radius: 3px;
18 | overflow: hidden;
19 | }
20 | .webuploader-pick-hover {
21 | background: #00a2d4;
22 | }
23 |
24 | .webuploader-pick-disable {
25 | opacity: 0.6;
26 | pointer-events:none;
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/example/public/ueditor/ueditor.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * ueditor完整配置项
3 | * 可以在这里配置整个编辑器的特性
4 | */
5 | /**************************提示********************************
6 | * 所有被注释的配置项均为UEditor默认值。
7 | * 修改默认配置请首先确保已经完全明确该参数的真实用途。
8 | * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。
9 | * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。
10 | **************************提示********************************/
11 |
12 | (function () {
13 |
14 | /**
15 | * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
16 | * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
17 | * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。
18 | * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
19 | * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
20 | * window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
21 | */
22 | var URL = window.UEDITOR_HOME_URL || getUEBasePath();
23 |
24 | /**
25 | * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
26 | */
27 | window.UEDITOR_CONFIG = {
28 |
29 | //为编辑器实例添加一个路径,这个不能被注释
30 | UEDITOR_HOME_URL: URL
31 |
32 | // 服务器统一请求接口路径
33 | , serverUrl: URL+'ue'
34 |
35 | //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
36 |
37 | , toolbars: [["fullscreen","source","undo","redo","insertunorderedlist","insertorderedlist","link","unlink","help","attachment","simpleupload","insertimage","emotion","pagebreak","date","bold","italic","fontborder","strikethrough","underline","forecolor","justifyleft","justifycenter","justifyright","justifyjustify","paragraph","rowspacingbottom","rowspacingtop","lineheight"]]
38 | //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
39 | //,labelMap:{
40 | // 'anchor':'', 'undo':''
41 | //}
42 |
43 | //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
44 | //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
45 | //,lang:"zh-cn"
46 | //,langPath:URL +"lang/"
47 |
48 | //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
49 | //现有如下皮肤:default
50 | //,theme:'default'
51 | //,themePath:URL +"themes/"
52 |
53 | //,zIndex : 900 //编辑器层级的基数,默认是900
54 |
55 | //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
56 | //,charset:"utf-8"
57 |
58 | //若实例化编辑器的页面手动修改的domain,此处需要设置为true
59 | //,customDomain:false
60 |
61 | //常用配置项目
62 | //,isShow : true //默认显示编辑器
63 |
64 | //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
65 |
66 | //,initialContent:'欢迎使用ueditor!' //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
67 |
68 | //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
69 |
70 | //,focus:false //初始化时,是否让编辑器获得焦点true或false
71 |
72 | //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
73 | //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
74 |
75 | //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
76 |
77 | //,initialFrameWidth:1000 //初始化编辑器宽度,默认1000
78 | //,initialFrameHeight:320 //初始化编辑器高度,默认320
79 |
80 | //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
81 |
82 | //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
83 |
84 | //,fullscreen : false //是否开启初始化时即全屏,默认关闭
85 |
86 | //,imagePopup:true //图片操作的浮层开关,默认打开
87 |
88 | //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
89 |
90 | //粘贴只保留标签,去除标签所有属性
91 | //,retainOnlyLabelPasted: false
92 |
93 | //,pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
94 | //纯文本粘贴模式下的过滤规则
95 | //'filterTxtRules' : function(){
96 | // function transP(node){
97 | // node.tagName = 'p';
98 | // node.setStyle();
99 | // }
100 | // return {
101 | // //直接删除及其字节点内容
102 | // '-' : 'script style object iframe embed input select',
103 | // 'p': {$:{}},
104 | // 'br':{$:{}},
105 | // 'div':{'$':{}},
106 | // 'li':{'$':{}},
107 | // 'caption':transP,
108 | // 'th':transP,
109 | // 'tr':transP,
110 | // 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
111 | // 'td':function(node){
112 | // //没有内容的td直接删掉
113 | // var txt = !!node.innerText();
114 | // if(txt){
115 | // node.parentNode.insertAfter(UE.uNode.createText(' '),node);
116 | // }
117 | // node.parentNode.removeChild(node,node.innerText())
118 | // }
119 | // }
120 | //}()
121 |
122 | //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
123 |
124 | //insertorderedlist
125 | //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
126 | //,'insertorderedlist':{
127 | // //自定的样式
128 | // 'num':'1,2,3...',
129 | // 'num1':'1),2),3)...',
130 | // 'num2':'(1),(2),(3)...',
131 | // 'cn':'一,二,三....',
132 | // 'cn1':'一),二),三)....',
133 | // 'cn2':'(一),(二),(三)....',
134 | // //系统自带
135 | // 'decimal' : '' , //'1,2,3...'
136 | // 'lower-alpha' : '' , // 'a,b,c...'
137 | // 'lower-roman' : '' , //'i,ii,iii...'
138 | // 'upper-alpha' : '' , lang //'A,B,C'
139 | // 'upper-roman' : '' //'I,II,III...'
140 | //}
141 |
142 | //insertunorderedlist
143 | //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
144 | //,insertunorderedlist : { //自定的样式
145 | // 'dash' :'— 破折号', //-破折号
146 | // 'dot':' 。 小圆圈', //系统自带
147 | // 'circle' : '', // '○ 小圆圈'
148 | // 'disc' : '', // '● 小圆点'
149 | // 'square' : '' //'■ 小方块'
150 | //}
151 | //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
152 | //,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径
153 | //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制
154 |
155 | //,autoTransWordToList:false //禁止word中粘贴进来的列表自动变成列表标签
156 |
157 | //paragraph
158 | //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
159 | //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
160 |
161 | //rowspacingtop
162 | //段间距 值和显示的名字相同
163 | //,'rowspacingtop':['5', '10', '15', '20', '25']
164 |
165 | //rowspacingBottom
166 | //段间距 值和显示的名字相同
167 | //,'rowspacingbottom':['5', '10', '15', '20', '25']
168 |
169 | //lineheight
170 | //行内间距 值和显示的名字相同
171 | //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5']
172 |
173 | //快捷菜单
174 | //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
175 |
176 | //tab
177 | //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
178 | //,tabSize:4
179 | //,tabNode:' '
180 |
181 | //undo
182 | //可以最多回退的次数,默认20
183 | //,maxUndoCount:20
184 | //当输入的字符数超过该值时,保存一次现场
185 | //,maxInputCount:1
186 |
187 | //scaleEnabled
188 | //是否可以拉伸长高,默认true(当开启时,自动长高失效)
189 | //,scaleEnabled:false
190 | //,minFrameWidth:800 //编辑器拖动时最小宽度,默认800
191 | //,minFrameHeight:220 //编辑器拖动时最小高度,默认220
192 |
193 | //pageBreakTag
194 | //分页标识符,默认是_ueditor_page_break_tag_
195 | //,pageBreakTag:'_ueditor_page_break_tag_'
196 |
197 | //sourceEditor
198 | //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
199 | //注意默认codemirror只能在ie8+和非ie中使用
200 | //,sourceEditor:"codemirror"
201 | //如果sourceEditor是codemirror,还用配置一下两个参数
202 | //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
203 | //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
204 | //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
205 | //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
206 | //编辑器初始化完成后是否进入源码模式,默认为否。
207 | //,sourceEditorFirst:false
208 |
209 | //iframeUrlMap
210 | //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
211 | //,iframeUrlMap:{
212 | // 'anchor':'~/dialogs/anchor/anchor.html',
213 | //}
214 |
215 | };
216 |
217 | function getUEBasePath(docUrl, confUrl) {
218 |
219 | return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
220 |
221 | }
222 |
223 | function getConfigFilePath() {
224 |
225 | var configPath = document.getElementsByTagName('script');
226 |
227 | return configPath[ configPath.length - 1 ].src;
228 |
229 | }
230 |
231 | function getBasePath(docUrl, confUrl) {
232 |
233 | var basePath = confUrl;
234 |
235 |
236 | if (/^(\/|\\\\)/.test(confUrl)) {
237 |
238 | basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
239 |
240 | } else if (!/^[a-z]+:/i.test(confUrl)) {
241 |
242 | docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
243 |
244 | basePath = docUrl + "" + confUrl;
245 |
246 | }
247 |
248 | return optimizationPath(basePath);
249 |
250 | }
251 |
252 | function optimizationPath(path) {
253 |
254 | var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ],
255 | tmp = null,
256 | res = [];
257 |
258 | path = path.replace(protocol, "").split("?")[0].split("#")[0];
259 |
260 | path = path.replace(/\\/g, '/').split(/\//);
261 |
262 | path[ path.length - 1 ] = "";
263 |
264 | while (path.length) {
265 |
266 | if (( tmp = path.shift() ) === "..") {
267 | res.pop();
268 | } else if (tmp !== ".") {
269 | res.push(tmp);
270 | }
271 |
272 | }
273 |
274 | return protocol + res.join("/");
275 |
276 | }
277 | function upFiles() {
278 | var myFiles = _editor.getDialog("attachment");
279 | myFiles.open();
280 | }
281 | window.UE = {
282 | getUEBasePath: getUEBasePath
283 | };
284 |
285 | })();
286 |
--------------------------------------------------------------------------------
/example/public/ueditor/ueditor.parse.js:
--------------------------------------------------------------------------------
1 | (function(){
2 |
3 | // parse.js
4 | (function(){
5 | UE = window.UE || {};
6 | var isIE = !!window.ActiveXObject;
7 | //定义utils工具
8 | var utils = {
9 | removeLastbs : function(url){
10 | return url.replace(/\/$/,'')
11 | },
12 | extend : function(t,s){
13 | var a = arguments,
14 | notCover = this.isBoolean(a[a.length - 1]) ? a[a.length - 1] : false,
15 | len = this.isBoolean(a[a.length - 1]) ? a.length - 1 : a.length;
16 | for (var i = 1; i < len; i++) {
17 | var x = a[i];
18 | for (var k in x) {
19 | if (!notCover || !t.hasOwnProperty(k)) {
20 | t[k] = x[k];
21 | }
22 | }
23 | }
24 | return t;
25 | },
26 | isIE : isIE,
27 | cssRule : isIE ? function(key,style,doc){
28 | var indexList,index;
29 | doc = doc || document;
30 | if(doc.indexList){
31 | indexList = doc.indexList;
32 | }else{
33 | indexList = doc.indexList = {};
34 | }
35 | var sheetStyle;
36 | if(!indexList[key]){
37 | if(style === undefined){
38 | return ''
39 | }
40 | sheetStyle = doc.createStyleSheet('',index = doc.styleSheets.length);
41 | indexList[key] = index;
42 | }else{
43 | sheetStyle = doc.styleSheets[indexList[key]];
44 | }
45 | if(style === undefined){
46 | return sheetStyle.cssText
47 | }
48 | sheetStyle.cssText = sheetStyle.cssText + '\n' + (style || '')
49 | } : function(key,style,doc){
50 | doc = doc || document;
51 | var head = doc.getElementsByTagName('head')[0],node;
52 | if(!(node = doc.getElementById(key))){
53 | if(style === undefined){
54 | return ''
55 | }
56 | node = doc.createElement('style');
57 | node.id = key;
58 | head.appendChild(node)
59 | }
60 | if(style === undefined){
61 | return node.innerHTML
62 | }
63 | if(style !== ''){
64 | node.innerHTML = node.innerHTML + '\n' + style;
65 | }else{
66 | head.removeChild(node)
67 | }
68 | },
69 | domReady : function (onready) {
70 | var doc = window.document;
71 | if (doc.readyState === "complete") {
72 | onready();
73 | }else{
74 | if (isIE) {
75 | (function () {
76 | if (doc.isReady) return;
77 | try {
78 | doc.documentElement.doScroll("left");
79 | } catch (error) {
80 | setTimeout(arguments.callee, 0);
81 | return;
82 | }
83 | onready();
84 | })();
85 | window.attachEvent('onload', function(){
86 | onready()
87 | });
88 | } else {
89 | doc.addEventListener("DOMContentLoaded", function () {
90 | doc.removeEventListener("DOMContentLoaded", arguments.callee, false);
91 | onready();
92 | }, false);
93 | window.addEventListener('load', function(){onready()}, false);
94 | }
95 | }
96 |
97 | },
98 | each : function(obj, iterator, context) {
99 | if (obj == null) return;
100 | if (obj.length === +obj.length) {
101 | for (var i = 0, l = obj.length; i < l; i++) {
102 | if(iterator.call(context, obj[i], i, obj) === false)
103 | return false;
104 | }
105 | } else {
106 | for (var key in obj) {
107 | if (obj.hasOwnProperty(key)) {
108 | if(iterator.call(context, obj[key], key, obj) === false)
109 | return false;
110 | }
111 | }
112 | }
113 | },
114 | inArray : function(arr,item){
115 | var index = -1;
116 | this.each(arr,function(v,i){
117 | if(v === item){
118 | index = i;
119 | return false;
120 | }
121 | });
122 | return index;
123 | },
124 | pushItem : function(arr,item){
125 | if(this.inArray(arr,item)==-1){
126 | arr.push(item)
127 | }
128 | },
129 | trim: function (str) {
130 | return str.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g, '');
131 | },
132 | indexOf: function (array, item, start) {
133 | var index = -1;
134 | start = this.isNumber(start) ? start : 0;
135 | this.each(array, function (v, i) {
136 | if (i >= start && v === item) {
137 | index = i;
138 | return false;
139 | }
140 | });
141 | return index;
142 | },
143 | hasClass: function (element, className) {
144 | className = className.replace(/(^[ ]+)|([ ]+$)/g, '').replace(/[ ]{2,}/g, ' ').split(' ');
145 | for (var i = 0, ci, cls = element.className; ci = className[i++];) {
146 | if (!new RegExp('\\b' + ci + '\\b', 'i').test(cls)) {
147 | return false;
148 | }
149 | }
150 | return i - 1 == className.length;
151 | },
152 | addClass:function (elm, classNames) {
153 | if(!elm)return;
154 | classNames = this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' ');
155 | for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){
156 | if(!new RegExp('\\b' + ci + '\\b').test(cls)){
157 | cls += ' ' + ci;
158 | }
159 | }
160 | elm.className = utils.trim(cls);
161 | },
162 | removeClass:function (elm, classNames) {
163 | classNames = this.isArray(classNames) ? classNames :
164 | this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' ');
165 | for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){
166 | cls = cls.replace(new RegExp('\\b' + ci + '\\b'),'')
167 | }
168 | cls = this.trim(cls).replace(/[ ]{2,}/g,' ');
169 | elm.className = cls;
170 | !cls && elm.removeAttribute('className');
171 | },
172 | on: function (element, type, handler) {
173 | var types = this.isArray(type) ? type : type.split(/\s+/),
174 | k = types.length;
175 | if (k) while (k--) {
176 | type = types[k];
177 | if (element.addEventListener) {
178 | element.addEventListener(type, handler, false);
179 | } else {
180 | if (!handler._d) {
181 | handler._d = {
182 | els : []
183 | };
184 | }
185 | var key = type + handler.toString(),index = utils.indexOf(handler._d.els,element);
186 | if (!handler._d[key] || index == -1) {
187 | if(index == -1){
188 | handler._d.els.push(element);
189 | }
190 | if(!handler._d[key]){
191 | handler._d[key] = function (evt) {
192 | return handler.call(evt.srcElement, evt || window.event);
193 | };
194 | }
195 |
196 |
197 | element.attachEvent('on' + type, handler._d[key]);
198 | }
199 | }
200 | }
201 | element = null;
202 | },
203 | off: function (element, type, handler) {
204 | var types = this.isArray(type) ? type : type.split(/\s+/),
205 | k = types.length;
206 | if (k) while (k--) {
207 | type = types[k];
208 | if (element.removeEventListener) {
209 | element.removeEventListener(type, handler, false);
210 | } else {
211 | var key = type + handler.toString();
212 | try{
213 | element.detachEvent('on' + type, handler._d ? handler._d[key] : handler);
214 | }catch(e){}
215 | if (handler._d && handler._d[key]) {
216 | var index = utils.indexOf(handler._d.els,element);
217 | if(index!=-1){
218 | handler._d.els.splice(index,1);
219 | }
220 | handler._d.els.length == 0 && delete handler._d[key];
221 | }
222 | }
223 | }
224 | },
225 | loadFile : function () {
226 | var tmpList = [];
227 | function getItem(doc,obj){
228 | try{
229 | for(var i= 0,ci;ci=tmpList[i++];){
230 | if(ci.doc === doc && ci.url == (obj.src || obj.href)){
231 | return ci;
232 | }
233 | }
234 | }catch(e){
235 | return null;
236 | }
237 |
238 | }
239 | return function (doc, obj, fn) {
240 | var item = getItem(doc,obj);
241 | if (item) {
242 | if(item.ready){
243 | fn && fn();
244 | }else{
245 | item.funs.push(fn)
246 | }
247 | return;
248 | }
249 | tmpList.push({
250 | doc:doc,
251 | url:obj.src||obj.href,
252 | funs:[fn]
253 | });
254 | if (!doc.body) {
255 | var html = [];
256 | for(var p in obj){
257 | if(p == 'tag')continue;
258 | html.push(p + '="' + obj[p] + '"')
259 | }
260 | doc.write('<' + obj.tag + ' ' + html.join(' ') + ' >'+obj.tag+'>');
261 | return;
262 | }
263 | if (obj.id && doc.getElementById(obj.id)) {
264 | return;
265 | }
266 | var element = doc.createElement(obj.tag);
267 | delete obj.tag;
268 | for (var p in obj) {
269 | element.setAttribute(p, obj[p]);
270 | }
271 | element.onload = element.onreadystatechange = function () {
272 | if (!this.readyState || /loaded|complete/.test(this.readyState)) {
273 | item = getItem(doc,obj);
274 | if (item.funs.length > 0) {
275 | item.ready = 1;
276 | for (var fi; fi = item.funs.pop();) {
277 | fi();
278 | }
279 | }
280 | element.onload = element.onreadystatechange = null;
281 | }
282 | };
283 | element.onerror = function(){
284 | throw Error('The load '+(obj.href||obj.src)+' fails,check the url')
285 | };
286 | doc.getElementsByTagName("head")[0].appendChild(element);
287 | }
288 | }()
289 | };
290 | utils.each(['String', 'Function', 'Array', 'Number', 'RegExp', 'Object','Boolean'], function (v) {
291 | utils['is' + v] = function (obj) {
292 | return Object.prototype.toString.apply(obj) == '[object ' + v + ']';
293 | }
294 | });
295 | var parselist = {};
296 | UE.parse = {
297 | register : function(parseName,fn){
298 | parselist[parseName] = fn;
299 | },
300 | load : function(opt){
301 | utils.each(parselist,function(v){
302 | v.call(opt,utils);
303 | })
304 | }
305 | };
306 | uParse = function(selector,opt){
307 | utils.domReady(function(){
308 | var contents;
309 | if(document.querySelectorAll){
310 | contents = document.querySelectorAll(selector)
311 | }else{
312 | if(/^#/.test(selector)){
313 | contents = [document.getElementById(selector.replace(/^#/,''))]
314 | }else if(/^\./.test(selector)){
315 | var contents = [];
316 | utils.each(document.getElementsByTagName('*'),function(node){
317 | if(node.className && new RegExp('\\b' + selector.replace(/^\./,'') + '\\b','i').test(node.className)){
318 | contents.push(node)
319 | }
320 | })
321 | }else{
322 | contents = document.getElementsByTagName(selector)
323 | }
324 | }
325 | utils.each(contents,function(v){
326 | UE.parse.load(utils.extend({root:v,selector:selector},opt))
327 | })
328 | })
329 | }
330 | })();
331 |
332 |
333 | // list.js
334 | UE.parse.register('list',function(utils){
335 | var customCss = [],
336 | customStyle = {
337 | 'cn' : 'cn-1-',
338 | 'cn1' : 'cn-2-',
339 | 'cn2' : 'cn-3-',
340 | 'num' : 'num-1-',
341 | 'num1' : 'num-2-',
342 | 'num2' : 'num-3-',
343 | 'dash' : 'dash',
344 | 'dot' : 'dot'
345 | };
346 |
347 |
348 | utils.extend(this,{
349 | liiconpath : 'http://bs.baidu.com/listicon/',
350 | listDefaultPaddingLeft : '20'
351 | });
352 |
353 | var root = this.root,
354 | ols = root.getElementsByTagName('ol'),
355 | uls = root.getElementsByTagName('ul'),
356 | selector = this.selector;
357 |
358 | if(ols.length){
359 | applyStyle.call(this,ols);
360 | }
361 |
362 | if(uls.length){
363 | applyStyle.call(this,uls);
364 | }
365 |
366 | if(ols.length || uls.length){
367 | customCss.push(selector +' .list-paddingleft-1{padding-left:0}');
368 | customCss.push(selector +' .list-paddingleft-2{padding-left:'+ this.listDefaultPaddingLeft+'px}');
369 | customCss.push(selector +' .list-paddingleft-3{padding-left:'+ this.listDefaultPaddingLeft*2+'px}');
370 |
371 | utils.cssRule('list', selector +' ol,'+selector +' ul{margin:0;padding:0;}li{clear:both;}'+customCss.join('\n'), document);
372 | }
373 | function applyStyle(nodes){
374 | var T = this;
375 | utils.each(nodes,function(list){
376 | if(list.className && /custom_/i.test(list.className)){
377 | var listStyle = list.className.match(/custom_(\w+)/)[1];
378 | if(listStyle == 'dash' || listStyle == 'dot'){
379 | utils.pushItem(customCss,selector +' li.list-' + customStyle[listStyle] + '{background-image:url(' + T.liiconpath +customStyle[listStyle]+'.gif)}');
380 | utils.pushItem(customCss,selector +' ul.custom_'+listStyle+'{list-style:none;} '+ selector +' ul.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}');
381 |
382 | }else{
383 | var index = 1;
384 | utils.each(list.childNodes,function(li){
385 | if(li.tagName == 'LI'){
386 | utils.pushItem(customCss,selector + ' li.list-' + customStyle[listStyle] + index + '{background-image:url(' + T.liiconpath + 'list-'+customStyle[listStyle] +index + '.gif)}');
387 | index++;
388 | }
389 | });
390 | utils.pushItem(customCss,selector + ' ol.custom_'+listStyle+'{list-style:none;}'+selector+' ol.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}');
391 | }
392 | switch(listStyle){
393 | case 'cn':
394 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}');
395 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}');
396 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}');
397 | break;
398 | case 'cn1':
399 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:30px}');
400 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}');
401 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}');
402 | break;
403 | case 'cn2':
404 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:40px}');
405 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:55px}');
406 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:68px}');
407 | break;
408 | case 'num':
409 | case 'num1':
410 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}');
411 | break;
412 | case 'num2':
413 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:35px}');
414 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}');
415 | break;
416 | case 'dash':
417 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:35px}');
418 | break;
419 | case 'dot':
420 | utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:20px}');
421 | }
422 | }
423 | });
424 | }
425 |
426 |
427 | });
428 |
429 |
430 |
431 | })();
--------------------------------------------------------------------------------
/example/public/ueditor/ueditor.parse.min.js:
--------------------------------------------------------------------------------
1 | !function(){!function(){UE=window.UE||{};var isIE=!!window.ActiveXObject;var utils={removeLastbs:function(url){return url.replace(/\/$/,"")},extend:function(t,s){var a=arguments,notCover=this.isBoolean(a[a.length-1])?a[a.length-1]:false,len=this.isBoolean(a[a.length-1])?a.length-1:a.length;for(var i=1;i=start&&v===item){index=i;return false}});return index},hasClass:function(element,className){className=className.replace(/(^[ ]+)|([ ]+$)/g,"").replace(/[ ]{2,}/g," ").split(" ");for(var i=0,ci,cls=element.className;ci=className[i++];){if(!new RegExp("\\b"+ci+"\\b","i").test(cls)){return false}}return i-1==className.length},addClass:function(elm,classNames){if(!elm)return;classNames=this.trim(classNames).replace(/[ ]{2,}/g," ").split(" ");for(var i=0,ci,cls=elm.className;ci=classNames[i++];){if(!new RegExp("\\b"+ci+"\\b").test(cls)){cls+=" "+ci}}elm.className=utils.trim(cls)},removeClass:function(elm,classNames){classNames=this.isArray(classNames)?classNames:this.trim(classNames).replace(/[ ]{2,}/g," ").split(" ");for(var i=0,ci,cls=elm.className;ci=classNames[i++];){cls=cls.replace(new RegExp("\\b"+ci+"\\b"),"")}cls=this.trim(cls).replace(/[ ]{2,}/g," ");elm.className=cls;!cls&&elm.removeAttribute("className")},on:function(element,type,handler){var types=this.isArray(type)?type:type.split(/\s+/),k=types.length;if(k)while(k--){type=types[k];if(element.addEventListener){element.addEventListener(type,handler,false)}else{if(!handler._d){handler._d={els:[]}}var key=type+handler.toString(),index=utils.indexOf(handler._d.els,element);if(!handler._d[key]||index==-1){if(index==-1){handler._d.els.push(element)}if(!handler._d[key]){handler._d[key]=function(evt){return handler.call(evt.srcElement,evt||window.event)}}element.attachEvent("on"+type,handler._d[key])}}}element=null},off:function(element,type,handler){var types=this.isArray(type)?type:type.split(/\s+/),k=types.length;if(k)while(k--){type=types[k];if(element.removeEventListener){element.removeEventListener(type,handler,false)}else{var key=type+handler.toString();try{element.detachEvent("on"+type,handler._d?handler._d[key]:handler)}catch(e){}if(handler._d&&handler._d[key]){var index=utils.indexOf(handler._d.els,element);if(index!=-1){handler._d.els.splice(index,1)}handler._d.els.length==0&&delete handler._d[key]}}}},loadFile:function(){var tmpList=[];function getItem(doc,obj){try{for(var i=0,ci;ci=tmpList[i++];){if(ci.doc===doc&&ci.url==(obj.src||obj.href)){return ci}}}catch(e){return null}}return function(doc,obj,fn){var item=getItem(doc,obj);if(item){if(item.ready){fn&&fn()}else{item.funs.push(fn)}return}tmpList.push({doc:doc,url:obj.src||obj.href,funs:[fn]});if(!doc.body){var html=[];for(var p in obj){if(p=="tag")continue;html.push(p+'="'+obj[p]+'"')}doc.write("<"+obj.tag+" "+html.join(" ")+" >"+obj.tag+">");return}if(obj.id&&doc.getElementById(obj.id)){return}var element=doc.createElement(obj.tag);delete obj.tag;for(var p in obj){element.setAttribute(p,obj[p])}element.onload=element.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){item=getItem(doc,obj);if(item.funs.length>0){item.ready=1;for(var fi;fi=item.funs.pop();){fi()}}element.onload=element.onreadystatechange=null}};element.onerror=function(){throw Error("The load "+(obj.href||obj.src)+" fails,check the url")};doc.getElementsByTagName("head")[0].appendChild(element)}}()};utils.each(["String","Function","Array","Number","RegExp","Object","Boolean"],function(v){utils["is"+v]=function(obj){return Object.prototype.toString.apply(obj)=="[object "+v+"]"}});var parselist={};UE.parse={register:function(parseName,fn){parselist[parseName]=fn},load:function(opt){utils.each(parselist,function(v){v.call(opt,utils)})}};uParse=function(selector,opt){utils.domReady(function(){var contents;if(document.querySelectorAll){contents=document.querySelectorAll(selector)}else{if(/^#/.test(selector)){contents=[document.getElementById(selector.replace(/^#/,""))]}else if(/^\./.test(selector)){var contents=[];utils.each(document.getElementsByTagName("*"),function(node){if(node.className&&new RegExp("\\b"+selector.replace(/^\./,"")+"\\b","i").test(node.className)){contents.push(node)}})}else{contents=document.getElementsByTagName(selector)}}utils.each(contents,function(v){UE.parse.load(utils.extend({root:v,selector:selector},opt))})})}}();UE.parse.register("list",function(utils){var customCss=[],customStyle={cn:"cn-1-",cn1:"cn-2-",cn2:"cn-3-",num:"num-1-",num1:"num-2-",num2:"num-3-",dash:"dash",dot:"dot"};utils.extend(this,{liiconpath:"http://bs.baidu.com/listicon/",listDefaultPaddingLeft:"20"});var root=this.root,ols=root.getElementsByTagName("ol"),uls=root.getElementsByTagName("ul"),selector=this.selector;if(ols.length){applyStyle.call(this,ols)}if(uls.length){applyStyle.call(this,uls)}if(ols.length||uls.length){customCss.push(selector+" .list-paddingleft-1{padding-left:0}");customCss.push(selector+" .list-paddingleft-2{padding-left:"+this.listDefaultPaddingLeft+"px}");customCss.push(selector+" .list-paddingleft-3{padding-left:"+this.listDefaultPaddingLeft*2+"px}");utils.cssRule("list",selector+" ol,"+selector+" ul{margin:0;padding:0;}li{clear:both;}"+customCss.join("\n"),document)}function applyStyle(nodes){var T=this;utils.each(nodes,function(list){if(list.className&&/custom_/i.test(list.className)){var listStyle=list.className.match(/custom_(\w+)/)[1];if(listStyle=="dash"||listStyle=="dot"){utils.pushItem(customCss,selector+" li.list-"+customStyle[listStyle]+"{background-image:url("+T.liiconpath+customStyle[listStyle]+".gif)}");utils.pushItem(customCss,selector+" ul.custom_"+listStyle+"{list-style:none;} "+selector+" ul.custom_"+listStyle+" li{background-position:0 3px;background-repeat:no-repeat}")}else{var index=1;utils.each(list.childNodes,function(li){if(li.tagName=="LI"){utils.pushItem(customCss,selector+" li.list-"+customStyle[listStyle]+index+"{background-image:url("+T.liiconpath+"list-"+customStyle[listStyle]+index+".gif)}");index++}});utils.pushItem(customCss,selector+" ol.custom_"+listStyle+"{list-style:none;}"+selector+" ol.custom_"+listStyle+" li{background-position:0 3px;background-repeat:no-repeat}")}switch(listStyle){case"cn":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-1{padding-left:25px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-2{padding-left:40px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-3{padding-left:55px}");break;case"cn1":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-1{padding-left:30px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-2{padding-left:40px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-3{padding-left:55px}");break;case"cn2":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-1{padding-left:40px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-2{padding-left:55px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-3{padding-left:68px}");break;case"num":case"num1":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-1{padding-left:25px}");break;case"num2":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-1{padding-left:35px}");utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft-2{padding-left:40px}");break;case"dash":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft{padding-left:35px}");break;case"dot":utils.pushItem(customCss,selector+" li.list-"+listStyle+"-paddingleft{padding-left:20px}")}}})}})}();
--------------------------------------------------------------------------------
/example/views/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/netpi/ueditor/fc6e79d5885101d8f65b218229f58c6f7d97bd7e/example/views/.DS_Store
--------------------------------------------------------------------------------
/example/views/ueditor.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | 完整demo
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
完整demo
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
48 |
50 |
51 |
52 |
156 |
157 |
--------------------------------------------------------------------------------
/example/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | accepts@1.0.1:
6 | version "1.0.1"
7 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.0.1.tgz#c1e06d613e6246ba874678d6d9b92389b7ce310c"
8 | dependencies:
9 | mime "~1.2.11"
10 | negotiator "~0.4.0"
11 |
12 | balanced-match@^0.4.1:
13 | version "0.4.2"
14 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
15 |
16 | body-parser@~1.0.0:
17 | version "1.0.2"
18 | resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.0.2.tgz#3461479a3278fe00fcaebec3314bb54fc4f7b47c"
19 | dependencies:
20 | qs "~0.6.6"
21 | raw-body "~1.1.2"
22 | type-is "~1.1.0"
23 |
24 | brace-expansion@^1.0.0:
25 | version "1.1.7"
26 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
27 | dependencies:
28 | balanced-match "^0.4.1"
29 | concat-map "0.0.1"
30 |
31 | buffer-crc32@0.2.1:
32 | version "0.2.1"
33 | resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.1.tgz#be3e5382fc02b6d6324956ac1af98aa98b08534c"
34 |
35 | busboy@^0.2.9:
36 | version "0.2.14"
37 | resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453"
38 | dependencies:
39 | dicer "0.2.5"
40 | readable-stream "1.1.x"
41 |
42 | bytes@0.3.0:
43 | version "0.3.0"
44 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-0.3.0.tgz#78e2e0e28c7f9c7b988ea8aee0db4d5fa9941935"
45 |
46 | bytes@1:
47 | version "1.0.0"
48 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8"
49 |
50 | concat-map@0.0.1:
51 | version "0.0.1"
52 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
53 |
54 | cookie-parser@~1.0.1:
55 | version "1.0.1"
56 | resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.0.1.tgz#17bd622c9717cd0858a912a9fef4c0362360a7b0"
57 | dependencies:
58 | cookie "0.1.0"
59 | cookie-signature "1.0.3"
60 |
61 | cookie-signature@1.0.3:
62 | version "1.0.3"
63 | resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.3.tgz#91cd997cc51fb641595738c69cda020328f50ff9"
64 |
65 | cookie@0.1.0:
66 | version "0.1.0"
67 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.1.0.tgz#90eb469ddce905c866de687efc43131d8801f9d0"
68 |
69 | cookie@0.1.2:
70 | version "0.1.2"
71 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.1.2.tgz#72fec3d24e48a3432073d90c12642005061004b1"
72 |
73 | core-util-is@~1.0.0:
74 | version "1.0.2"
75 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
76 |
77 | debug@0.8.0:
78 | version "0.8.0"
79 | resolved "https://registry.yarnpkg.com/debug/-/debug-0.8.0.tgz#0541ea91f0e503fdf0c5eed418a32550234967f0"
80 |
81 | debug@0.8.1:
82 | version "0.8.1"
83 | resolved "https://registry.yarnpkg.com/debug/-/debug-0.8.1.tgz#20ff4d26f5e422cb68a1bacbbb61039ad8c1c130"
84 |
85 | debug@~0.7.4:
86 | version "0.7.4"
87 | resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39"
88 |
89 | dicer@0.2.5:
90 | version "0.2.5"
91 | resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f"
92 | dependencies:
93 | readable-stream "1.1.x"
94 | streamsearch "0.1.2"
95 |
96 | ejs@^1.0.0:
97 | version "1.0.0"
98 | resolved "https://registry.yarnpkg.com/ejs/-/ejs-1.0.0.tgz#c9c60a48a46ee452fb32a71c317b95e5aa1fcb3d"
99 |
100 | escape-html@1.0.1:
101 | version "1.0.1"
102 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.1.tgz#181a286ead397a39a92857cfb1d43052e356bff0"
103 |
104 | express@~4.2.0:
105 | version "4.2.0"
106 | resolved "https://registry.yarnpkg.com/express/-/express-4.2.0.tgz#3121993a45126693e8bf897aefb4dd783762dc60"
107 | dependencies:
108 | accepts "1.0.1"
109 | buffer-crc32 "0.2.1"
110 | cookie "0.1.2"
111 | cookie-signature "1.0.3"
112 | debug "0.8.1"
113 | escape-html "1.0.1"
114 | fresh "0.2.2"
115 | merge-descriptors "0.0.2"
116 | methods "1.0.0"
117 | parseurl "1.0.1"
118 | path-to-regexp "0.1.2"
119 | qs "0.6.6"
120 | range-parser "1.0.0"
121 | send "0.3.0"
122 | serve-static "1.1.0"
123 | type-is "1.1.0"
124 | utils-merge "1.0.0"
125 |
126 | fresh@0.2.2, fresh@~0.2.1:
127 | version "0.2.2"
128 | resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.2.2.tgz#9731dcf5678c7faeb44fb903c4f72df55187fa77"
129 |
130 | fs-extra@^0.11.0:
131 | version "0.11.1"
132 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.11.1.tgz#df104f94cc841eef8fafe2a446c88f5d35bb2e79"
133 | dependencies:
134 | jsonfile "^2.0.0"
135 | mkdirp "^0.5.0"
136 | ncp "^0.6.0"
137 | rimraf "^2.2.8"
138 |
139 | fs.realpath@^1.0.0:
140 | version "1.0.0"
141 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
142 |
143 | glob@^7.0.5:
144 | version "7.1.1"
145 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
146 | dependencies:
147 | fs.realpath "^1.0.0"
148 | inflight "^1.0.4"
149 | inherits "2"
150 | minimatch "^3.0.2"
151 | once "^1.3.0"
152 | path-is-absolute "^1.0.0"
153 |
154 | graceful-fs@^4.1.6:
155 | version "4.1.11"
156 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
157 |
158 | inflight@^1.0.4:
159 | version "1.0.6"
160 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
161 | dependencies:
162 | once "^1.3.0"
163 | wrappy "1"
164 |
165 | inherits@2, inherits@~2.0.1:
166 | version "2.0.3"
167 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
168 |
169 | isarray@0.0.1:
170 | version "0.0.1"
171 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
172 |
173 | jsonfile@^2.0.0:
174 | version "2.4.0"
175 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
176 | optionalDependencies:
177 | graceful-fs "^4.1.6"
178 |
179 | merge-descriptors@0.0.2:
180 | version "0.0.2"
181 | resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-0.0.2.tgz#c36a52a781437513c57275f39dd9d317514ac8c7"
182 |
183 | methods@1.0.0:
184 | version "1.0.0"
185 | resolved "https://registry.yarnpkg.com/methods/-/methods-1.0.0.tgz#9a73d86375dfcef26ef61ca3e4b8a2e2538a80e3"
186 |
187 | mime@1.2.11, mime@~1.2.11:
188 | version "1.2.11"
189 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10"
190 |
191 | minimatch@^3.0.2:
192 | version "3.0.3"
193 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
194 | dependencies:
195 | brace-expansion "^1.0.0"
196 |
197 | minimist@0.0.8:
198 | version "0.0.8"
199 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
200 |
201 | mkdirp@^0.5.0:
202 | version "0.5.1"
203 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
204 | dependencies:
205 | minimist "0.0.8"
206 |
207 | morgan@~1.0.0:
208 | version "1.0.1"
209 | resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.0.1.tgz#8250a5d711de625453022945344d4d6762630c64"
210 | dependencies:
211 | bytes "0.3.0"
212 |
213 | ncp@^0.6.0:
214 | version "0.6.0"
215 | resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.6.0.tgz#df8ce021e262be21b52feb3d3e5cfaab12491f0d"
216 |
217 | negotiator@~0.4.0:
218 | version "0.4.9"
219 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.4.9.tgz#92e46b6db53c7e421ed64a2bc94f08be7630df3f"
220 |
221 | node-snowflake@0.0.1:
222 | version "0.0.1"
223 | resolved "https://registry.yarnpkg.com/node-snowflake/-/node-snowflake-0.0.1.tgz#0be5eabd5b1131f639e63e89c5f82daa814b3ab9"
224 |
225 | once@^1.3.0:
226 | version "1.4.0"
227 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
228 | dependencies:
229 | wrappy "1"
230 |
231 | parseurl@1.0.1:
232 | version "1.0.1"
233 | resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.0.1.tgz#2e57dce6efdd37c3518701030944c22bf388b7b4"
234 |
235 | path-is-absolute@^1.0.0:
236 | version "1.0.1"
237 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
238 |
239 | path-to-regexp@0.1.2:
240 | version "0.1.2"
241 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.2.tgz#9b2b151f9cc3018c9eea50ca95729e05781712b4"
242 |
243 | qs@0.6.6, qs@~0.6.6:
244 | version "0.6.6"
245 | resolved "https://registry.yarnpkg.com/qs/-/qs-0.6.6.tgz#6e015098ff51968b8a3c819001d5f2c89bc4b107"
246 |
247 | range-parser@1.0.0, range-parser@~1.0.0:
248 | version "1.0.0"
249 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.0.0.tgz#a4b264cfe0be5ce36abe3765ac9c2a248746dbc0"
250 |
251 | raw-body@~1.1.2:
252 | version "1.1.7"
253 | resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425"
254 | dependencies:
255 | bytes "1"
256 | string_decoder "0.10"
257 |
258 | readable-stream@1.1.x:
259 | version "1.1.14"
260 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
261 | dependencies:
262 | core-util-is "~1.0.0"
263 | inherits "~2.0.1"
264 | isarray "0.0.1"
265 | string_decoder "~0.10.x"
266 |
267 | rimraf@^2.2.8:
268 | version "2.6.1"
269 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d"
270 | dependencies:
271 | glob "^7.0.5"
272 |
273 | send@0.3.0:
274 | version "0.3.0"
275 | resolved "https://registry.yarnpkg.com/send/-/send-0.3.0.tgz#9718324634806fc75bc4f8f5e51f57d9d66606e7"
276 | dependencies:
277 | buffer-crc32 "0.2.1"
278 | debug "0.8.0"
279 | fresh "~0.2.1"
280 | mime "1.2.11"
281 | range-parser "~1.0.0"
282 |
283 | serve-static@1.1.0:
284 | version "1.1.0"
285 | resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.1.0.tgz#454dfa05bb3ddd4e701a8915b83a278aa91c5643"
286 | dependencies:
287 | parseurl "1.0.1"
288 | send "0.3.0"
289 |
290 | static-favicon@~1.0.0:
291 | version "1.0.2"
292 | resolved "https://registry.yarnpkg.com/static-favicon/-/static-favicon-1.0.2.tgz#7c15920dda2bf33f414b0e60aebbd65cdd2a1d2f"
293 |
294 | streamsearch@0.1.2:
295 | version "0.1.2"
296 | resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a"
297 |
298 | string_decoder@0.10, string_decoder@~0.10.x:
299 | version "0.10.31"
300 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
301 |
302 | type-is@1.1.0, type-is@~1.1.0:
303 | version "1.1.0"
304 | resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.1.0.tgz#d0245ec8b2676668d59dd0cf3255060676a57db6"
305 | dependencies:
306 | mime "~1.2.11"
307 |
308 | ueditor@^1.0.0:
309 | version "1.2.1"
310 | resolved "https://registry.yarnpkg.com/ueditor/-/ueditor-1.2.1.tgz#225b318d2e73677829bd8e3e6e490847f1c391c5"
311 | dependencies:
312 | busboy "^0.2.9"
313 | fs-extra "^0.11.0"
314 | node-snowflake "0.0.1"
315 |
316 | utils-merge@1.0.0:
317 | version "1.0.0"
318 | resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8"
319 |
320 | wrappy@1:
321 | version "1.0.2"
322 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
323 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | var ueditor = require('./lib')
2 | module.exports = ueditor;
--------------------------------------------------------------------------------
/lib/index.js:
--------------------------------------------------------------------------------
1 | var Busboy = require('busboy');
2 | var fs = require('fs');
3 | var fse = require('fs-extra');
4 | var os = require('os');
5 | var path = require('path');
6 | var snowflake = require('node-snowflake').Snowflake;
7 | var qn = require('qn');
8 | let FdfsClient = require('fdfs');
9 |
10 | var isEmpty = function(obj) {
11 | return Object.keys(obj).length === 0 && obj.constructor === Object;
12 | }
13 |
14 | var getFdfs = function(fdfs) {
15 |
16 | return new FdfsClient({
17 | // tracker servers
18 | trackers: [{
19 | host: fdfs.upload.host,
20 | port: fdfs.upload.port
21 | }],
22 | // 默认超时时间10s
23 | timeout: fdfs.timeout || 10000,
24 |
25 | // 默认后缀
26 | // 当获取不到文件后缀时使用
27 | defaultExt: fdfs.defaultExt || 'png',
28 | // charset默认utf8
29 | charset: fdfs.charset || 'utf8'
30 | });
31 | };
32 |
33 | var ueditor = function (static_url, config = {}, handel) {
34 | return function (req, res, next) {
35 | var _respond = respond(static_url, config, handel);
36 | _respond(req, res, next);
37 | };
38 | };
39 | var respond = function (static_url, config = {}, callback) {
40 | if (typeof config === 'function') {
41 | callback = config
42 | config = {}
43 | }
44 | return function (req, res, next) {
45 | if (req.query.action === 'config') {
46 | callback(req, res, next);
47 | return;
48 | } else if (req.query.action === 'listimage') {
49 | res.ue_list = function (list_dir) {
50 | var str = '';
51 | var i = 0;
52 | var list = [];
53 | fs.readdir(static_url + list_dir, function (err, files) {
54 | if (err) throw err;
55 |
56 | var total = files.length;
57 | files.forEach(function (file) {
58 |
59 | var filetype = 'jpg,png,gif,ico,bmp';
60 | var tmplist = file.split('.');
61 | var _filetype = tmplist[tmplist.length - 1];
62 | if (filetype.indexOf(_filetype.toLowerCase()) >= 0) {
63 | var temp = {};
64 | if (list_dir === '/') {
65 | temp.url = list_dir + file;
66 | } else {
67 | temp.url = list_dir + "/" + file;
68 | }
69 | list[i] = (temp);
70 | } else { }
71 | i++;
72 | // send file name string when all files was processed
73 | if (i === total) {
74 | res.json({
75 | "state": "SUCCESS",
76 | "list": list,
77 | "start": 1,
78 | "total": total
79 | });
80 | }
81 | });
82 | });
83 | };
84 | //如果配置了fdfs则从fdfs.list列表读取图片url
85 | if (config.fdfs) {
86 | res.ue_list = function(list_dir) {
87 | fs.readFile(static_url+list_dir+'fdfs.list', function(err, data) {
88 | var list = [];
89 | if (data) {
90 | var dataList = data.toString().split('\n');
91 | dataList.forEach(function(item) {
92 | if (item) list.push(JSON.parse(item))
93 | })
94 | }
95 | res.json({
96 | "state": 'SUCCESS',
97 | "list": list,
98 | "start": 1,
99 | "total": list.length
100 | })
101 | })
102 | }
103 | }
104 | callback(req, res, next);
105 |
106 | } else if (req.query.action === 'uploadimage'||req.query.action === 'uploadfile'||req.query.action === 'uploadvideo') {
107 | var busboy = new Busboy({
108 | headers: req.headers
109 | });
110 | busboy.on('file', function (fieldname, file, filename, encoding, mimetype) {
111 | req.ueditor = {};
112 | req.ueditor.fieldname = fieldname;
113 | req.ueditor.file = file;
114 | req.ueditor.filename = filename;
115 | req.ueditor.encoding = encoding;
116 | req.ueditor.mimetype = mimetype;
117 | res.ue_up = function (img_url) {
118 | var tmpdir = path.join(os.tmpdir(), path.basename(filename));
119 | var name = snowflake.nextId() + path.extname(tmpdir);
120 | var dest = path.join(static_url, img_url, name);
121 | var client = {};
122 | if (config.qn) {
123 | client = qn.create(config.qn);
124 | client.upload(file, {
125 | key: 'ueditor/images/' + name
126 | }, function (err, results) {
127 | if (err) throw err;
128 | res.json({
129 | 'url': results.url,
130 | 'title': req.body.pictitle,
131 | 'original': filename,
132 | 'state': 'SUCCESS'
133 | });
134 | });
135 | return false
136 | }
137 | if (config.fdfs) {
138 | var fdfs = getFdfs(config.fdfs);
139 | var tempBuffer = [];
140 | file.on('data', function (chunk) {
141 | tempBuffer.push(chunk);
142 | })
143 | file.on('end', function () {
144 | var buffer = Buffer.concat(tempBuffer)
145 |
146 | fdfs.upload(buffer).then(function (fileId) {
147 | var result = {
148 | 'url': 'http://' + config.fdfs.download.host + '/' + fileId,
149 | 'title': req.body && req.body.pictitle || filename,
150 | 'original': filename,
151 | 'state': 'SUCCESS'
152 | };
153 | fse.createFile(path.join(static_url, img_url, 'fdfs.list'), function(err) {
154 | if (err) throw err;
155 | fs.open(path.join(static_url, img_url, 'fdfs.list'), 'a', function(err, fd) {
156 | if (err) throw err;
157 | fs.write(fd, '\n'+JSON.stringify(result), function(e) {
158 | if (e) throw e;
159 | })
160 | })
161 | })
162 | res.json(result)
163 | })
164 | .catch(function (err) {
165 | if (err) throw err;
166 | })
167 | })
168 | }
169 |
170 | //默认上传到项目目录(config对象为空时) 或者 config.local , config.qn 都为 true 时会同时上传到七牛及项目目录
171 | if (!config || isEmpty(config) || config.local) {
172 | var writeStream = fs.createWriteStream(tmpdir);
173 | file.pipe(writeStream);
174 | writeStream.on("close", function () {
175 | fse.move(tmpdir, dest, function (err) {
176 | if (err) throw err;
177 | res.json({
178 | 'url': path.join(img_url, name).replace(/\\/g,'/'),
179 | 'title': req.body.pictitle,
180 | 'original': filename,
181 | 'state': 'SUCCESS'
182 | });
183 | });
184 | })
185 | }
186 | };
187 | callback(req, res, next);
188 | });
189 | req.pipe(busboy);
190 | } else {
191 | callback(req, res, next);
192 | }
193 | return;
194 | };
195 | };
196 | module.exports = ueditor;
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ueditor",
3 | "decription": "nodejs for ueditor",
4 | "author": {
5 | "name": "Night_elf"
6 | },
7 | "version": "1.2.3",
8 | "dependencies": {
9 | "busboy": "^0.2.9",
10 | "fs-extra": "^0.11.0",
11 | "node-snowflake": "0.0.1",
12 | "qn": "^1.3.0",
13 | "fdfs": "^1.0.4"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/netpi/ueditor"
18 | },
19 | "main": "index.js",
20 | "description": "",
21 | "bugs": {
22 | "url": "https://github.com/netpi/ueditor/issues"
23 | },
24 | "homepage": "https://github.com/netpi/ueditor",
25 | "_id": "ueditor@1.0.0",
26 | "scripts": {},
27 | "_shasum": "28993ad1dbde8b1d83452400b1c77398f18e630e",
28 | "_from": "ueditor@^1.0.0",
29 | "gitHead": "2538eb8e109572939df8b8a02623f53aaf4e0de4",
30 | "_npmVersion": "1.4.14",
31 | "_npmUser": {
32 | "name": "netpi",
33 | "email": "hellonewworld@vip.qq.com"
34 | },
35 | "maintainers": [{
36 | "name": "netpi",
37 | "email": "hellonewworld@vip.qq.com"
38 | }],
39 | "dist": {
40 | "shasum": "28993ad1dbde8b1d83452400b1c77398f18e630e",
41 | "tarball": "http://registry.npmjs.org/ueditor/-/ueditor-1.0.0.tgz"
42 | },
43 | "directories": {},
44 | "_resolved": "https://registry.npmjs.org/ueditor/-/ueditor-1.0.0.tgz"
45 | }
46 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | address@>=0.0.1:
6 | version "1.0.1"
7 | resolved "https://registry.yarnpkg.com/address/-/address-1.0.1.tgz#363f5d3f2be26d0655d8afd5a9562e4fc2194537"
8 |
9 | agentkeepalive@^2.2.0:
10 | version "2.2.0"
11 | resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef"
12 |
13 | any-promise@^1.3.0:
14 | version "1.3.0"
15 | resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
16 |
17 | balanced-match@^0.4.1:
18 | version "0.4.2"
19 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
20 |
21 | brace-expansion@^1.0.0:
22 | version "1.1.7"
23 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
24 | dependencies:
25 | balanced-match "^0.4.1"
26 | concat-map "0.0.1"
27 |
28 | buffer-type@^0.0.2:
29 | version "0.0.2"
30 | resolved "https://registry.yarnpkg.com/buffer-type/-/buffer-type-0.0.2.tgz#8a0bbcbe786049af8b436a636b9b50525fe26ca3"
31 |
32 | busboy@^0.2.9:
33 | version "0.2.14"
34 | resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453"
35 | dependencies:
36 | dicer "0.2.5"
37 | readable-stream "1.1.x"
38 |
39 | concat-map@0.0.1:
40 | version "0.0.1"
41 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
42 |
43 | content-type@^1.0.2:
44 | version "1.0.2"
45 | resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed"
46 |
47 | copy-to@~2.0.1:
48 | version "2.0.1"
49 | resolved "https://registry.yarnpkg.com/copy-to/-/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5"
50 |
51 | core-util-is@~1.0.0:
52 | version "1.0.2"
53 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
54 |
55 | debug@^2.2.0, debug@^2.6.0:
56 | version "2.6.3"
57 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d"
58 | dependencies:
59 | ms "0.7.2"
60 |
61 | default-user-agent@^1.0.0:
62 | version "1.0.0"
63 | resolved "https://registry.yarnpkg.com/default-user-agent/-/default-user-agent-1.0.0.tgz#16c46efdcaba3edc45f24f2bd4868b01b7c2adc6"
64 | dependencies:
65 | os-name "~1.0.3"
66 |
67 | destroy@^1.0.4:
68 | version "1.0.4"
69 | resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
70 |
71 | dicer@0.2.5:
72 | version "0.2.5"
73 | resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f"
74 | dependencies:
75 | readable-stream "1.1.x"
76 | streamsearch "0.1.2"
77 |
78 | digest-header@^0.0.1:
79 | version "0.0.1"
80 | resolved "https://registry.yarnpkg.com/digest-header/-/digest-header-0.0.1.tgz#11ccf6deec5766ac379744d901c12cba49514be6"
81 | dependencies:
82 | utility "0.1.11"
83 |
84 | ee-first@~1.1.1:
85 | version "1.1.1"
86 | resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
87 |
88 | escape-html@~1.0.3:
89 | version "1.0.3"
90 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
91 |
92 | formstream@^1.0.0:
93 | version "1.1.0"
94 | resolved "https://registry.yarnpkg.com/formstream/-/formstream-1.1.0.tgz#51f3970f26136eb0ad44304de4cebb50207b4479"
95 | dependencies:
96 | destroy "^1.0.4"
97 | mime "^1.3.4"
98 | pause-stream "~0.0.11"
99 |
100 | fs-extra@^0.11.0:
101 | version "0.11.1"
102 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.11.1.tgz#df104f94cc841eef8fafe2a446c88f5d35bb2e79"
103 | dependencies:
104 | jsonfile "^2.0.0"
105 | mkdirp "^0.5.0"
106 | ncp "^0.6.0"
107 | rimraf "^2.2.8"
108 |
109 | fs.realpath@^1.0.0:
110 | version "1.0.0"
111 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
112 |
113 | glob@^7.0.5:
114 | version "7.1.1"
115 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
116 | dependencies:
117 | fs.realpath "^1.0.0"
118 | inflight "^1.0.4"
119 | inherits "2"
120 | minimatch "^3.0.2"
121 | once "^1.3.0"
122 | path-is-absolute "^1.0.0"
123 |
124 | graceful-fs@^4.1.6:
125 | version "4.1.11"
126 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
127 |
128 | humanize-ms@^1.2.0:
129 | version "1.2.0"
130 | resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.0.tgz#4d691a1fa1b87989789af8e58cddfd550622e4d4"
131 | dependencies:
132 | ms "~0.7.0"
133 |
134 | iconv-lite@^0.4.15:
135 | version "0.4.15"
136 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
137 |
138 | inflight@^1.0.4:
139 | version "1.0.6"
140 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
141 | dependencies:
142 | once "^1.3.0"
143 | wrappy "1"
144 |
145 | inherits@2, inherits@~2.0.1:
146 | version "2.0.3"
147 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
148 |
149 | isarray@0.0.1:
150 | version "0.0.1"
151 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
152 |
153 | jsonfile@^2.0.0:
154 | version "2.4.0"
155 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
156 | optionalDependencies:
157 | graceful-fs "^4.1.6"
158 |
159 | mime@^1.3.4:
160 | version "1.3.4"
161 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
162 |
163 | minimatch@^3.0.2:
164 | version "3.0.3"
165 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
166 | dependencies:
167 | brace-expansion "^1.0.0"
168 |
169 | minimist@0.0.8:
170 | version "0.0.8"
171 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
172 |
173 | minimist@^1.1.0:
174 | version "1.2.0"
175 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
176 |
177 | mkdirp@^0.5.0:
178 | version "0.5.1"
179 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
180 | dependencies:
181 | minimist "0.0.8"
182 |
183 | ms@0.7.2, ms@~0.7.0:
184 | version "0.7.2"
185 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
186 |
187 | ncp@^0.6.0:
188 | version "0.6.0"
189 | resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.6.0.tgz#df8ce021e262be21b52feb3d3e5cfaab12491f0d"
190 |
191 | node-snowflake@0.0.1:
192 | version "0.0.1"
193 | resolved "https://registry.yarnpkg.com/node-snowflake/-/node-snowflake-0.0.1.tgz#0be5eabd5b1131f639e63e89c5f82daa814b3ab9"
194 |
195 | once@^1.3.0:
196 | version "1.4.0"
197 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
198 | dependencies:
199 | wrappy "1"
200 |
201 | os-name@~1.0.3:
202 | version "1.0.3"
203 | resolved "https://registry.yarnpkg.com/os-name/-/os-name-1.0.3.tgz#1b379f64835af7c5a7f498b357cb95215c159edf"
204 | dependencies:
205 | osx-release "^1.0.0"
206 | win-release "^1.0.0"
207 |
208 | osx-release@^1.0.0:
209 | version "1.1.0"
210 | resolved "https://registry.yarnpkg.com/osx-release/-/osx-release-1.1.0.tgz#f217911a28136949af1bf9308b241e2737d3cd6c"
211 | dependencies:
212 | minimist "^1.1.0"
213 |
214 | path-is-absolute@^1.0.0:
215 | version "1.0.1"
216 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
217 |
218 | pause-stream@~0.0.11:
219 | version "0.0.11"
220 | resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
221 | dependencies:
222 | through "~2.3"
223 |
224 | qn@^1.3.0:
225 | version "1.3.0"
226 | resolved "https://registry.yarnpkg.com/qn/-/qn-1.3.0.tgz#5fc453c44be718aafaac7a8c1d1578fb0698e109"
227 | dependencies:
228 | agentkeepalive "^2.2.0"
229 | buffer-type "^0.0.2"
230 | debug "^2.2.0"
231 | formstream "^1.0.0"
232 | urllib "^2.11.0"
233 | utility "^1.8.0"
234 |
235 | qs@^6.4.0:
236 | version "6.4.0"
237 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
238 |
239 | readable-stream@1.1.x:
240 | version "1.1.14"
241 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
242 | dependencies:
243 | core-util-is "~1.0.0"
244 | inherits "~2.0.1"
245 | isarray "0.0.1"
246 | string_decoder "~0.10.x"
247 |
248 | rimraf@^2.2.8:
249 | version "2.6.1"
250 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d"
251 | dependencies:
252 | glob "^7.0.5"
253 |
254 | semver@^5.0.1:
255 | version "5.3.0"
256 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
257 |
258 | statuses@^1.3.1:
259 | version "1.3.1"
260 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e"
261 |
262 | streamsearch@0.1.2:
263 | version "0.1.2"
264 | resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a"
265 |
266 | string_decoder@~0.10.x:
267 | version "0.10.31"
268 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
269 |
270 | through@~2.3:
271 | version "2.3.8"
272 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
273 |
274 | urllib@^2.11.0:
275 | version "2.22.0"
276 | resolved "https://registry.yarnpkg.com/urllib/-/urllib-2.22.0.tgz#2965dc4ae127a6fb695b7db27d3184f17d82cb42"
277 | dependencies:
278 | any-promise "^1.3.0"
279 | content-type "^1.0.2"
280 | debug "^2.6.0"
281 | default-user-agent "^1.0.0"
282 | digest-header "^0.0.1"
283 | ee-first "~1.1.1"
284 | humanize-ms "^1.2.0"
285 | iconv-lite "^0.4.15"
286 | qs "^6.4.0"
287 | statuses "^1.3.1"
288 |
289 | utility@0.1.11:
290 | version "0.1.11"
291 | resolved "https://registry.yarnpkg.com/utility/-/utility-0.1.11.tgz#fde60cf9b4e4751947a0cf5d104ce29367226715"
292 | dependencies:
293 | address ">=0.0.1"
294 |
295 | utility@^1.8.0:
296 | version "1.11.0"
297 | resolved "https://registry.yarnpkg.com/utility/-/utility-1.11.0.tgz#25c70e983cd8f625eeb7e508a3da4541d1df4725"
298 | dependencies:
299 | copy-to "~2.0.1"
300 | escape-html "~1.0.3"
301 |
302 | win-release@^1.0.0:
303 | version "1.1.1"
304 | resolved "https://registry.yarnpkg.com/win-release/-/win-release-1.1.1.tgz#5fa55e02be7ca934edfc12665632e849b72e5209"
305 | dependencies:
306 | semver "^5.0.1"
307 |
308 | wrappy@1:
309 | version "1.0.2"
310 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
311 |
--------------------------------------------------------------------------------