diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..fa31fcbec --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +[*.{html,js,css,scss,xml}] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.yml] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3afe0f014..6b12680ec 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,11 @@ ############### .idea log -upload +jsp/upload +php/upload +net/upload +asp/upload +node/upload ############### @@ -164,7 +168,7 @@ Desktop.ini dist eggs parts -bin +# bin var sdist develop-eggs diff --git a/Gruntfile.js b/Gruntfile.js index da90a8508..6a2d90c75 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,244 +1,303 @@ -'use strict'; - -module.exports = function ( grunt ) { - - var fs = require("fs"), - Util = { - - jsBasePath: '_src/', - parseBasePath: '_parse/', - cssBasePath: 'themes/default/_css/', - - fetchScripts: function ( readFile, basePath) { - - var sources = fs.readFileSync( readFile ); - sources = /\[([^\]]+\.js'[^\]]+)\]/.exec( sources ); - sources = sources[1].replace( /\/\/.*\n/g, '\n' ).replace( /'|"|\n|\t|\s/g, '' ); - sources = sources.split( "," ); - sources.forEach( function ( filepath, index ) { - sources[ index ] = basePath + filepath; - } ); - - return sources; - }, - - fetchStyles: function () { - - var sources = fs.readFileSync( this.cssBasePath + "ueditor.css" ), - filepath = null, - pattern = /@import\s+([^;]+)*;/g, - src = []; - - while ( filepath = pattern.exec( sources ) ) { - src.push( this.cssBasePath + filepath[ 1 ].replace( /'|"/g, "" ) ); - } - - return src; - - } +"use strict"; + +module.exports = function(grunt) { + var fs = require("fs"), + Util = { + jsBasePath: "_src/", + parseBasePath: "_parse/", + cssBasePath: "themes/default/_css/", + + fetchScripts: function(readFile, basePath) { + var sources = fs.readFileSync(readFile); + sources = /\[([^\]]+\.js'[^\]]+)\]/.exec(sources); + sources = sources[1] + .replace(/\/\/.*\n/g, "\n") + .replace(/'|"|\n|\t|\s/g, ""); + sources = sources.split(","); + sources.forEach(function(filepath, index) { + sources[index] = basePath + filepath; + }); + + return sources; + }, + + fetchStyles: function() { + var sources = fs.readFileSync(this.cssBasePath + "ueditor.css"), + filepath = null, + pattern = /@import\s+([^;]+)*;/g, + src = []; + + while ((filepath = pattern.exec(sources))) { + src.push(this.cssBasePath + filepath[1].replace(/'|"/g, "")); + } + return src; + } + }, + packageJson = grunt.file.readJSON("package.json"), + server = grunt.option("server") || "php", + encode = grunt.option("encode") || "utf8", + disDir = "dist/", + banner = + "/*!\n * " + + packageJson.name + + "\n * version: " + + packageJson.version + + "\n * build: <%= new Date() %>\n */\n\n"; + + //init + (function() { + server = typeof server === "string" ? server.toLowerCase() : "php"; + encode = typeof encode === "string" ? encode.toLowerCase() : "utf8"; + + disDir = "dist/" + encode + "-" + server + "/"; + })(); + + grunt.initConfig({ + pkg: packageJson, + concat: { + js: { + options: { + banner: "/*!\n * " + + packageJson.name + + "\n * version: " + + packageJson.version + + "\n * build: <%= new Date() %>\n */\n\n" + + "(function(){\n\n", + footer: "\n\n})();\n", + process: function(src, s) { + var filename = s.substr(s.indexOf("/") + 1); + return ( + "// " + filename + "\n" + src.replace("/_css/", "/css/") + "\n" + ); + } }, - server = grunt.option('server') || 'php', - encode = grunt.option('encode') || 'utf8', - disDir = "dist/", - banner = '/*!\n * UEditor\n * version: <%= pkg.version %>\n * build: <%= new Date() %>\n */\n\n'; - - //init - ( function () { - - server = typeof server === "string" ? server.toLowerCase() : 'php'; - encode = typeof encode === "string" ? encode.toLowerCase() : 'utf8'; - - disDir = 'dist/' + encode + '-' + server + '/'; - - } )(); - - grunt.initConfig( { - pkg: grunt.file.readJSON('package.json'), - concat: { - js: { - options: { - banner: banner + '(function(){\n\n', - footer: '\n\n})()', - process: function(src) { - return src.replace('/_css/', '/css/'); - } - }, - src: Util.fetchScripts( "_examples/editor_api.js", Util.jsBasePath ), - dest: disDir + '<%= pkg.name %>.all.js' - }, - parse: { - options: { - banner: banner + '(function(){\n\n', - footer: '\n\n})()' - }, - src: Util.fetchScripts( "ueditor.parse.js", Util.parseBasePath ), - dest: disDir + '<%= pkg.name %>.parse.js' - }, - css: { - src: Util.fetchStyles(), - dest: disDir + 'themes/default/css/ueditor.css' - } - }, - cssmin: { - options: { - banner: banner - }, - files: { - expand: true, - cwd: disDir + 'themes/default/css/', - src: ['*.css', '!*.min.css'], - dest: disDir + 'themes/default/css/', - ext: '.min.css' - } + src: Util.fetchScripts("_examples/editor_api.js", Util.jsBasePath), + dest: disDir + packageJson.name + ".all.js" + }, + parse: { + options: { + banner: "/*!\n * " + + packageJson.name + + " parse\n * version: " + + packageJson.version + + "\n * build: <%= new Date() %>\n */\n\n" + + "(function(){\n\n", + footer: "\n\n})();\n" }, - gcc: { - dist: { - src: disDir + '<%= pkg.name %>.all.js', - dest: disDir + '<%= pkg.name %>.all.min.js' - }, - parse: { - src: disDir + '<%= pkg.name %>.parse.js', - dest: disDir + '<%= pkg.name %>.parse.min.js' - } + src: Util.fetchScripts("ueditor.parse.js", Util.parseBasePath), + dest: disDir + packageJson.name + ".parse.js" + }, + css: { + src: Util.fetchStyles(), + dest: disDir + "themes/default/css/ueditor.css" + } + }, + cssmin: { + options: { + banner: banner + }, + files: { + expand: true, + cwd: disDir + "themes/default/css/", + src: ["*.css", "!*.min.css"], + dest: disDir + "themes/default/css/", + ext: ".min.css" + } + }, + uglify: { + dist: { + options: { + banner: "/*!\n * " + + packageJson.name + + "\n * version: " + + packageJson.version + + "\n * build: <%= new Date() %>\n */" }, - copy: { - base: { - files: [ - { - - src: [ '*.html', 'themes/iframe.css', 'themes/default/dialogbase.css', 'themes/default/images/**', 'dialogs/**', 'lang/**', 'third-party/**' ], - dest: disDir - - } - ] - }, - demo: { - files: [ - { - src: '_examples/completeDemo.html', - dest: disDir + 'index.html' - } - ] - }, - php: { - - expand: true, - src: 'php/**', - dest: disDir - - }, - asp: { - - expand: true, - src: 'asp/**', - dest: disDir - - }, - jsp: { - - expand: true, - src: 'jsp/**', - dest: disDir - - }, - net: { - - expand: true, - src: 'net/**', - dest: disDir - - } + src: disDir + "<%= pkg.name %>.all.js", + dest: disDir + "<%= pkg.name %>.all.min.js" + }, + parse: { + options: { + banner: "/*!\n * " + + packageJson.name + + " parse\n * version: " + + packageJson.version + + "\n * build: <%= new Date() %>\n */" }, - transcoding: { - - options: { - charset: encode - }, - src: [disDir + '**/*.html', disDir + '**/*.js', disDir + '**/*.css', disDir + '**/*.jsp', disDir + '**/*.java', disDir + '**/*.php', disDir + '**/*.asp', disDir + '**/*.ashx', disDir + '**/*.cs'] - - }, - replace: { - - fileEncode: { - src: [ disDir+'**/*.html', disDir+'**/*.css', disDir+'**/*.php', disDir+'**/*.jsp', disDir+'**/*.net', disDir+'**/*.asp' ], - overwrite: true, - replacements: [ { - from: /utf-8/gi, - to: 'gbk' - } ] - }, - demo:{ - src: disDir+'index.html', - overwrite: true, - replacements: [ { - from: /\.\.\//gi, - to: '' - },{ - from: 'editor_api.js', - to: '<%= pkg.name %>.all.min.js' - } ] - }, - gbkasp:{ - - src: [ disDir+'asp/*.asp' ], - overwrite: true, - replacements: [ { - from: /65001/gi, - to: '936' - } ] - } - - } - - } ); - - grunt.loadNpmTasks('grunt-text-replace'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-gcc'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-transcoding'); - - grunt.registerTask('default', 'UEditor build', function () { - - var tasks = [ 'concat', 'cssmin', 'gcc', 'copy:base', 'copy:'+server, 'copy:demo', 'replace:demo' ]; - - if ( encode === 'gbk' ) { - tasks.push( 'replace:fileEncode' ); - if(server === 'asp') { - tasks.push( 'replace:gbkasp' ); - } - } - - tasks.push( 'transcoding' ); - - //config修改 - updateConfigFile(); - - grunt.task.run( tasks ); - - } ); - - - function updateConfigFile () { + src: disDir + "<%= pkg.name %>.parse.js", + dest: disDir + "<%= pkg.name %>.parse.min.js" + } + }, + copy: { + base: { + files: [ + { + src: [ + "*.html", + "themes/iframe.css", + "themes/default/dialogbase.css", + "themes/default/images/**", + "dialogs/**", + "lang/**", + "third-party/**" + ], + dest: disDir + } + ] + }, + demo: { + files: [ + { + src: "_examples/completeDemo.html", + dest: disDir + "index.html" + } + ] + }, + php: { + expand: true, + src: "php/**", + dest: disDir + }, + asp: { + expand: true, + src: "asp/**", + dest: disDir + }, + jsp: { + expand: true, + src: "jsp/**", + dest: disDir + }, + net: { + expand: true, + src: "net/**", + dest: disDir + } + }, + transcoding: { + options: { + charset: encode + }, + src: [ + disDir + "**/*.html", + disDir + "**/*.js", + disDir + "**/*.css", + disDir + "**/*.json", + disDir + "**/*.jsp", + disDir + "**/*.asp" + ] + }, + replace: { + fileEncode: { + src: [ + disDir + "**/*.html", + disDir + "dialogs/**/*.js", + disDir + "**/*.css", + disDir + "**/*.php", + disDir + "**/*.jsp", + disDir + "**/*.ashx", + disDir + "**/*.asp" + ], + overwrite: true, + replacements: [ + { + from: /utf-8/gi, + to: "gbk" + } + ] + }, + demo: { + src: disDir + "index.html", + overwrite: true, + replacements: [ + { + from: /\.\.\//gi, + to: "" + }, + { + from: "editor_api.js", + to: packageJson.name + ".all.min.js" + } + ] + }, + gbkasp: { + src: [disDir + "asp/*.asp"], + overwrite: true, + replacements: [ + { + from: /65001/gi, + to: "936" + } + ] + } + }, + clean: { + build: { + src: [ + disDir + "jsp/src", + disDir + "*/upload", + disDir + ".DS_Store", + disDir + "**/.DS_Store", + disDir + ".git", + disDir + "**/.git" + ] + } + } + }); + + grunt.loadNpmTasks("grunt-text-replace"); + grunt.loadNpmTasks("grunt-contrib-concat"); + grunt.loadNpmTasks("grunt-contrib-cssmin"); + grunt.loadNpmTasks("grunt-contrib-uglify"); + grunt.loadNpmTasks("grunt-contrib-copy"); + grunt.loadNpmTasks("grunt-transcoding"); + grunt.loadNpmTasks("grunt-contrib-clean"); + + grunt.registerTask("default", "UEditor build", function() { + var tasks = [ + "concat", + "cssmin", + "uglify", + "copy:base", + "copy:" + server, + "copy:demo", + "replace:demo", + "clean" + ]; + + if (encode === "gbk") { + tasks.push("replace:fileEncode"); + if (server === "asp") { + tasks.push("replace:gbkasp"); + } + } - var filename = 'ueditor.config.js', - file = grunt.file.read( filename ), - path = server + "/", - suffix = server === "net" ? ".ashx" : "."+server; + tasks.push("transcoding"); - file = file.replace( /php\//ig, path ).replace( /\.php/ig, suffix ); + //config修改 + updateConfigFile(); - //写入到dist - if ( grunt.file.write( disDir + filename, file ) ) { + grunt.task.run(tasks); + }); - grunt.log.writeln( 'config file update success' ); + function updateConfigFile() { + var filename = "ueditor.config.js", + file = grunt.file.read(filename), + path = server + "/", + suffix = server === "net" ? ".ashx" : "." + server; - } else { - grunt.log.warn('config file update error'); - } + file = file.replace(/php\//ig, path).replace(/\.php/ig, suffix); + if (encode == "gbk") { + file = file.replace(/utf-8/gi, "gbk"); } -}; \ No newline at end of file + //写入到dist + if (grunt.file.write(disDir + filename, file)) { + grunt.log.writeln("config file update success"); + } else { + grunt.log.warn("config file update error"); + } + } +}; diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..d6036bc4b --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,24 @@ +**声明:如果不看该说明,只在标题中描述问题,一律忽略** + +**首先**,感谢各位使用 UEditor,并来到这儿提 `ISSUE`。 + +**其次**,在回答大量用户提出的 `ISSUE` 的过程中,我们发现需要建立一个提 `ISSUE` 的规则, +将我们的主要精力投入到修复 `UEditor` Bugs 和改进 `UEditor` 中去,让越来越多的人能够使用的舒心。 + +## 规则 + +* 提 `ISSUE` 之前,**请先看看文档**。传送门:[文档](http://fex.baidu.com/ueditor/)。很多问题,在文档中都能有答案。特别是配置之类的。 +* 提 `ISSUE` 之前,**请先问问搜索引擎(百度、Google)**,因为你遇到的问题,可能其他人也遇到了,并且已经解决了。 +只需要动动手指,在输入框里输入,就会有答案,这样方便,远比等我们回复快捷。 +* 提 `ISSUE` 之前,如果你已经走过上面两步了,来到 `ISSUE` 这个页面了,此刻,请别急,**建议你再搜索一下`ISSUE`**。 +因为,或许你将提的问题,也有人遇到了,而且我们已经反馈了。这时,你只需要找到相应的 `ISSUE`,在那个 `ISSUE` 里留下你的关注就好了。很简单吧! + +以上都不满足你,看来这一定是个新的问题。首先,我们要感谢你,帮我们发现了一个新的问题,但是,为了使问题能尽快得到解决。我们建议你按照如下的规则来提: + +* 构想清楚问题的表达; +* 写一个简明扼要的标题 +* 写一个能描述清楚问题的内容,如果有复现步骤及截图当是极好的; + +**最后,是我们的一点希望:希望提 `ISSUE` 的同学,能自行排查、定位问题,甚至自行修复,然后给我们提 `Pull Request`。即使做不到提 `Pull Request`,但是你的排查的过程也是在增加你的 `debug` 的能力。** + +### 再次感谢各位选择 `UEditor`! diff --git a/README.md b/README.md index ac23f0da2..1e2e730e6 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,26 @@ -UEditor -====== +Get Started +===== -**UEditor富文本编辑器** +> 鉴于目前 ISSUE 较多而维护时间较少,且在进行后续的版本更新,目前暂时关闭 ISSUE,若社区有人跟进,欢迎和我们联系。重复的问题,请参阅常见问题的 [FAQ Wiki](https://github.com/fex-team/ueditor/wiki/FAQ)。 + +## 重要安全通告: + +1. commons-fileupload-1.3.1.jar 存在漏洞可能会导致 ddos,源代码中已经修改,使用老版本的用户,强烈推荐升级 commons-fileupload.jar 至最新版本。(2018-04-09). +2. UEditor 所提供的所有后端代码都仅为 DEMO 作用,切不可直接使用到生产环境中,目前已知 php 的代码会存在 ssrf 及文件包含漏洞,因此不再提供。 + +## ueditor富文本编辑器介绍 UEditor是由百度web前端研发部开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点,开源基于MIT协议,允许自由使用和修改代码。 -## 入门部署和体验 ## +## 1 入门部署和体验 -### 第一步:下载编辑器 ### +### 1.1 下载编辑器 -到官网下载ueditor最新版: [[官网地址]](http://ueditor.baidu.com/website/download.html#ueditor "官网地址") [[1.3.5下载地址]](http://ueditor.baidu.com/build/build_down.php?t=1_3_5-src) +1. `git clone ` 仓库 +2. `npm install` 安装依赖(如果没有安装 grunt , 请先在全局安装 grunt) +3. 在终端执行 `grunt default` -### 第二步:创建demo文件 ### +### 1.2 创建demo文件 解压下载的包,在解压后的目录创建demo.html文件,填入下面的html代码 ```html @@ -30,48 +39,71 @@ UEditor是由百度web前端研发部开发所见即所得富文本web编辑器 ``` -### 第三步:在浏览器打开demo.html ### +### 1.3 在浏览器打开demo.html 如果看到了下面这样的编辑器,恭喜你,初次部署成功! -![部署成功](http://www.ueditorbbs.com/data/attachment/forum/201311/01/180213cop7scr30s3p9wc0.png) +![部署成功](http://fex.baidu.com/ueditor/doc/images/demo.png) -## 更多使用文档 ## +### 1.4 传入自定义的参数 -1. [部署编辑器](_doc/部署编辑器.md "部署编辑器") +编辑器有很多可自定义的参数项,在实例化的时候可以传入给编辑器: +```javascript +var ue = UE.getEditor('container', { + autoHeight: false +}); +``` + +配置项也可以通过ueditor.config.js文件修改,具体的配置方法请看[前端配置项说明](http://fex.baidu.com/ueditor/#start-config1.4 前端配置项说明.md) + +### 1.5 设置和读取编辑器的内容 + +通getContent和setContent方法可以设置和读取编辑器的内容 +```javascript +var ue = UE.getEditor(); +//对编辑器的操作最好在编辑器ready之后再做 +ue.ready(function(){ + //设置编辑器的内容 + ue.setContent('hello'); + //获取html内容,返回:

hello

+ var html = ue.getContent(); + //获取纯文本内容,返回: hello + var txt = ue.getContentTxt(); +}); +``` -2. [提交表单并展示内容](_doc/提交表单并展示内容.md "提交表单并展示内容") +ueditor的更多API请看[API 文档](http://ueditor.baidu.com/doc "ueditor API 文档") -3. [部署编辑器](_doc/路径配置.md "路径配置") +### 1.6 dev-1.5.0 版本二次开发自定义插件注意事项 -4. [拖拽插入和粘贴图片](_doc/拖拽插入和粘贴图片.md "拖拽插入和粘贴图片") +dev-1.5.0版对于插件的加载逻辑进行了调整,但官网对应的[二次开发功能文档](http://fex.baidu.com/ueditor/#dev-developer)未对相应调整做出开发细节说明,现补充如下: -5. [ASP支持说明](_doc/ASP支持说明.md "ASP支持说明") +除进行原有配置外,还需在实例化ueditor编辑器时在 toolbars 参数数组中,加入自定义插件的 uiname,并且注意uiname必须小写,方可正确加载自定义插件。 -## 二次开发文档 ## +## 2 详细文档 -1. 注意:正式使用时,需要在build目录下运行merge.bat (运行需要java支持),这个操作会自动把_src的源代码合并到editor_all.js和editor_min.js这样也页面使用自己修改的编辑器的时候,就可以只引用editor_all.js。 +ueditor 官网:[http://ueditor.baidu.com](http://ueditor.baidu.com "ueditor 官网") -2. [增加一个简单按钮](_doc/增加一个简单按钮.md "增加一个简单按钮") +ueditor API 文档:[http://ueditor.baidu.com/doc](http://ueditor.baidu.com/doc "ueditor API 文档") -## 相关链接 ## +ueditor github 地址:[http://github.com/fex-team/ueditor](http://github.com/fex-team/ueditor "ueditor github 地址") -ueditor 官网: [http://ueditor.baidu.com](http://ueditor.baidu.com "ueditor 官网") +ueditor 第三方插件贡献 wiki : [第三方插件贡献规范](http://ueditor.baidu.com/website/thirdproject.html) -ueditor API 文档: [http://ueditor.baidu.com/doc](http://ueditor.baidu.com/doc "ueditor API 文档") +ueditor 贡献代码规范(javascript): [javascript规范](https://github.com/fex-team/styleguide/blob/master/javascript.md) -ueditor 论坛: [http://www.ueditorbbs.com](http://www.ueditorbbs.com "ueditor 论坛") +## 3 第三方贡献 -ueditor github 地址: [https://github.com/campaign/ueditor](https://github.com/campaign/ueditor "ueditor github 地址") +ueditor for nodejs 参考[https://github.com/netpi/ueditor](https://github.com/netpi/ueditor) -## 联系我们 ## +## 4 联系我们 -email: [ueditor@baidu.com](mailto://email:ueditor@baidu.com "发邮件给ueditor开发组") +email:[ueditor@baidu.com](mailto://email:ueditor@baidu.com "发邮件给ueditor开发组") -bbs: [www.ueditorbbs.com](http://www.ueditorbbs.com "ueditor 论坛") +issue:[github issue](http://github.com/fex-team/ueditor/issues "ueditor 论坛") diff --git "a/_doc/ASP\346\224\257\346\214\201\350\257\264\346\230\216.md" "b/_doc/ASP\346\224\257\346\214\201\350\257\264\346\230\216.md" deleted file mode 100644 index 9a2f82b87..000000000 --- "a/_doc/ASP\346\224\257\346\214\201\350\257\264\346\230\216.md" +++ /dev/null @@ -1,90 +0,0 @@ -# UEditor ASP 支持说明 - -应广大用户要求,UEditor 团队在原本支持的 PHP、Java 和 .Net 的后台的基础上,推出了 ASP 后台的支持。 - -## 支持版本 ## -支持 UEditor 1.2.6+ 的版本 - -## 支持功能 ## -支持所有其他后台已支持的功能,包括: - -1. 图片上传 -2. 远程图片转存 -3. 图片管理 -4. 涂鸦上传(包括背景) -5. Word 图片转存 -6. 截图上传 -7. 文件上传 - -## 部署指南 ## -Classic ASP 一般在 IIS 上运行。其它 ASP 服务器不介绍部署方式,请自行研究。 - -### ueditor.config.js 配置 ### -最简单的方法,就是把文件中的 php 都替换成 asp。要修改的配置包括: - -```javascript -{ - imageUrl:URL+"asp/imageUp.asp" - ,imagePath:URL + "asp/" - ,scrawlUrl:URL+"asp/scrawlUp.asp" - ,scrawlPath:URL+"asp/" - ,fileUrl:URL+"asp/fileUp.asp" - ,filePath:URL + "asp/" - ,catcherUrl:URL +"asp/getRemoteImage.asp" - ,catcherPath:URL + "asp/" - ,imageManagerUrl:URL + "asp/imageManager.asp" - ,imageManagerPath:URL + "asp/" - ,snapscreenServerUrl: URL +"asp/imageUp.asp" - ,snapscreenPath: URL + "asp/" - ,wordImageUrl:URL + "asp/imageUp.asp" - ,wordImagePath:URL + "asp/" - ,getMovieUrl:URL+"asp/getMovie.asp" -} -``` - -### 在 IIS 6.X 中部署 -IIS 的安装在这里不介绍,请自行查阅相关资料。 - -1. 启用 ASP 拓展 - * 打开 IIS 管理器 - * 展开本地计算机 - * 选中 Web 服务拓展 - * 允许 Active Server Pages 拓展 - -2. 配置网站脚本执行权限(如果使用虚拟路径,请跳过本步骤) - * 在网站上右击,点属性 - * 切换到主目录选项卡,勾选*读取*、*写入*两个权限,并且*执行权限*选择*纯脚本* - * 点确定 - -3. 使用虚拟路径 - * 在网站上右击,点*新建* - *虚拟路径* - * 按照向导填写名称和路径 - * 勾选*读取*、*执行脚本*和*写入*三个权限 - * 完成虚拟目录的创建 - -4. 配置脚本执行身份 - * 在网站或虚拟路径上右击,点属性 - * 选择*目录安全性*选项卡 - * 在*身份验证和访问控制*中点击*编辑* - * 勾选*启用匿名访问*,点击用户名后面的*浏览* - * 输入*administrator*点确定 - * 输入*administrator*账号的密码 - * 点击确定,再确认一次密码 - -5. 设置最大 HTTP 请求大小限制 - * 找到位于 C:\Windows\System32\Inetsrv 中的 metabase.XML,打开,查找ASPMaxRequestEntityAllowed,修改为需要的值(如10240000 即 10M) - > ASP 文件中也有上传文件大小的限制,不过先验证的限制是 IIS 中设置的,所以如果 IIS 中设置最大 256K,那么就算 ASP 中设置了最大 10M,那么超过 256K 的文件也无法上传,而且 ASP 没法给出错误信息。 - -### 在 IIS 7.X 中部署 -IIS7 默认不安装 ASP,需要手动添加进去。添加方法请读者自行查阅。 - -1. 配置脚本执行身份 - * 选中网站或者应用程序 - * 双击 IIS 中的*身份验证* - * 双击匿名身份验证 - * 填写*administrator*的用户名和密码,确定 - -2. 设置最大 HTTP 请求大小限制 - * 打开 IIS 控制台 - * 双击 ASP,展开*限制属性*,修改*醉倒请求实体主体限制*为需要的值(如10240000 即 10M) - > ASP 文件中也有上传文件大小的限制,不过先验证的限制是 IIS 中设置的,所以如果 IIS 中设置最大 256K,那么就算 ASP 中设置了最大 10M,那么超过 256K 的文件也无法上传,而且 ASP 没法给出错误信息。 \ No newline at end of file diff --git a/_doc/images/demo.png b/_doc/images/demo.png deleted file mode 100644 index 228e6103a..000000000 Binary files a/_doc/images/demo.png and /dev/null differ diff --git a/_doc/images/newbtn-setaction.png b/_doc/images/newbtn-setaction.png deleted file mode 100644 index 32d5920b3..000000000 Binary files a/_doc/images/newbtn-setaction.png and /dev/null differ diff --git a/_doc/images/newbtn-setstyle.png b/_doc/images/newbtn-setstyle.png deleted file mode 100644 index 2782c9937..000000000 Binary files a/_doc/images/newbtn-setstyle.png and /dev/null differ diff --git a/_doc/images/newbtn.png b/_doc/images/newbtn.png deleted file mode 100644 index a0f8ffbd2..000000000 Binary files a/_doc/images/newbtn.png and /dev/null differ diff --git a/_doc/images/parse.png b/_doc/images/parse.png deleted file mode 100644 index 693db79c9..000000000 Binary files a/_doc/images/parse.png and /dev/null differ diff --git a/_doc/images/sourcedir.png b/_doc/images/sourcedir.png deleted file mode 100644 index 4bcea5740..000000000 Binary files a/_doc/images/sourcedir.png and /dev/null differ diff --git a/_doc/images/uparse_script.png b/_doc/images/uparse_script.png deleted file mode 100644 index 75ce06aa6..000000000 Binary files a/_doc/images/uparse_script.png and /dev/null differ diff --git a/_doc/images/video.png b/_doc/images/video.png deleted file mode 100644 index 18325ee35..000000000 Binary files a/_doc/images/video.png and /dev/null differ diff --git "a/_doc/\344\270\212\344\274\240\350\247\206\351\242\221.md" "b/_doc/\344\270\212\344\274\240\350\247\206\351\242\221.md" deleted file mode 100644 index 9d941ac1c..000000000 --- "a/_doc/\344\270\212\344\274\240\350\247\206\351\242\221.md" +++ /dev/null @@ -1,32 +0,0 @@ -# 上传视频 - -## 支持版本 ## - -支持 UEditor 1.3.6+ 的版本 - -## 功能说明 ## - -视频插件添加了上传视频的功能,可以上传自己的视频到服务器,并插入编辑器。editor.getContent()获取到的编辑器的视频内容是video标签。 - -## 允许上传的视频格式 ## -视频上传服务器,上传后台路径是fileUp.php,和上传附件一致,允许的上传格式如下: -``` -".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".mov", ".wmv", ".mp4", ".webm" -``` - -## 输入输出过滤 - -1.插入到编辑器用图片占位代替,getContent得到的html内容是video标签,带有edui-upload-video的class名称。 - -2.setContent设置内容带有video标签,并且有edui-upload-video的class名称,会替换成图片占位符。 - -## 展示页面使用 ## - -展示页面需要引用ueditor.uparse.js文件。假如当前浏览器video标签支持当前格式,会使用video标签播放视频,否则会自动替换flash播放器,播放器使用的是videojs开源插件。 - -## 视频格式说明 ## - -下面是个浏览器视频格式要求,建议使用mp4的视频格式,兼容性较好。 - -![各浏览器视频格式要求](images/video.png) -各浏览器视频格式要求 --来自http://www.ckplayer.com \ No newline at end of file diff --git "a/_doc/\344\275\277\347\224\250grunt\346\211\223\345\214\205\346\272\220\344\273\243\347\240\201.md" "b/_doc/\344\275\277\347\224\250grunt\346\211\223\345\214\205\346\272\220\344\273\243\347\240\201.md" deleted file mode 100644 index 33a5ed75c..000000000 --- "a/_doc/\344\275\277\347\224\250grunt\346\211\223\345\214\205\346\272\220\344\273\243\347\240\201.md" +++ /dev/null @@ -1,42 +0,0 @@ -# 使用grunt打包源代码 - -随着nodejs和grunt的火爆,ueditor采用了grunt来作为线下的合并打包工具,支持编码和后台语言指定。 - -## 支持版本 ## -支持 UEditor 1.3.0+ 的版本 - -## 使用方法 - -1. 线上下载ueditor - * 下载地址:[ueditor](http://ueditor.baidu.com/website/download.html#ueditor),要下载"完整版 + 源码" - -2. 安装nodejs - * 下载[nodejs](http://www.nodejs.org)并安装到本地 - * 安装成功后,打开控制台,在控制台下输入```shell node -v``` - * 如果控制台输出nodejs的版本。那恭喜你,nodejs安装好了,可以使用ctrl+c退出node模式. - -3. 安装打包需要的grunt插件 - * 以终端方式(windows用户用cmd)进入ueditor源码根目录,执行```shell npm install``` - * 这个命令会根据package.json文件,安装打包需要的grunt和grunt插件 - * 安装结束后,会在ueditor目录下出现一个node_modules文件夹 - -4. 执行打包命令 - * 以终端方式(windows用户用cmd)进入ueditor源码根目录,执行```shell grunt``` - * 这个命令会根据Gruntfile.js执行打包打包的任务,运行过程 **需要java环境** 支持 - * 命令完成后,ueditor目录下会出现dist/目录,里面有你要的打包好的ueditor文件夹,默认是utf8-php文件夹 - -## 打包其他版本 -执行打包grunt命令时,可以传入编码和后台语言的参数 - -1. 支持两种编码指定:--encode参数 - * utf8 (默认编码) - * gbk - -2. 提供四种后台语言支持:--server参数 - * php (默认语言) - * jsp - * net (代表.net后台) - * asp - -例如:想要打包成编码是gbk,后台语言是asp版本,可执行命令: -```shell grunt --encode=gbk --server=asp``` diff --git "a/_doc/\345\242\236\345\212\240\344\270\200\344\270\252\347\256\200\345\215\225\347\232\204\346\214\211\351\222\256.md" "b/_doc/\345\242\236\345\212\240\344\270\200\344\270\252\347\256\200\345\215\225\347\232\204\346\214\211\351\222\256.md" deleted file mode 100644 index 040f92219..000000000 --- "a/_doc/\345\242\236\345\212\240\344\270\200\344\270\252\347\256\200\345\215\225\347\232\204\346\214\211\351\222\256.md" +++ /dev/null @@ -1,79 +0,0 @@ -# 增加一个简单按钮 -从最简单的功能开始UEditor的二次开发之旅:在工具栏上增加一个简单按钮,点击按钮的时候出现一个alert提示。 - -## 开发步骤 - -### 第一步:修改ueditor.config.js文件 -在ueditor.config.js文件中,找到toolbars参数,增加一个“showmsg”字符串,对应着添加一个labelMap,用于鼠标移上按钮时的提示。 - -```javascript -toolbars:[ - [..., 'searchreplace','help','showmsg'] -], -labelMap:{ - 'anchor':'', 'undo':'','showmsg':'简单按钮' -} -``` - - -### 第二步:修改_src/ui/editorui.js文件 -在_src/ui/editorui.js文件中,找到的btnCmds数组变量,在其中同样增加一个"showmsg"字符串。 -```javascript -var btnCmds = [..., 'mergecells', 'deletetable', 'showmsg']; -``` - -这时候,清空缓存刷新下页面!工具栏的对应位置是否出现了一个自己定义的按钮呢?如下图所示: - -![新增按钮](images/newbtn.png) - - -### 第三步:修改themes/default/ueditor.css文件 - -由于此时未设置对应按钮的图片样式,所以会显示默认的“B”字符。要想让其显示成自己需要的图标样式,接着按照下面的步骤动手吧。 - -找到themes/default/ueditor.css文件,增加一条样式定义。此处的样式定义了showmsg图标在UEditor默认的精灵Icon图片(themes/default/images/icons.png)中的位置偏移。如需更改成另外图标,只需添加图标到该图片文件中,然后设置偏移值即可。 - -```css -.edui-for-showmsg .edui-icon { - background-position: -640px -40px; -} -``` - -![新增按钮并设置背景](images/newbtn-setstyle.png) - - -### 第四步:添加_src/plugins/showmsg.js插件文件 - -到此为止,在UI层面已经完成了一个工具栏图标的显示和各种状态变化的逻辑,但是我们发现点击按钮之后毫无反应。那是必然的,我们还必须为该按钮绑定属于它自己的事件处理方法。 - -实质上,此时一个默认的事件处理方法已经被UEditor绑定到按钮上了,只不过由于我们还没有定义该方法的具体内容,所以点击之后无任何变化。 - -下面我们就来定义该方法的具体内容: -找到plugins目录,在该目录中添加一个showmsg.js文件,然后在该文件中输入如下代码: - -```javascript -UE.commands['showmsg'] = { - execCommand : function(){ - alert("Hello,UE developer!"); - } -}; -``` - -然后将该文件引入ueditor:打开_examples/editor_api.js文件,在paths数组中的适当位置(一般是指默认提供的插件部分地址的最后)增加一行plugins/showmsg.js的引用: - -```javascript -'plugins/webapp.js', -'plugins/showmsg.js', -'ui/ui.js', -``` - -再次刷新页面点击一下按钮吧! - -![新增按钮并设置动作](images/newbtn-setaction.png) - -## 打包文件 - -注意:正式使用ueditor时,需要把编辑器源码打包成ueditor.all.js文件,具体打包方法请看打包教程: - -[使用grunt打包源代码](使用grunt打包源代码.md "拖拽插入和粘贴图片") - diff --git "a/_doc/\346\217\220\344\272\244\350\241\250\345\215\225\345\271\266\345\261\225\347\244\272\345\206\205\345\256\271.md" "b/_doc/\346\217\220\344\272\244\350\241\250\345\215\225\345\271\266\345\261\225\347\244\272\345\206\205\345\256\271.md" deleted file mode 100644 index 95e93fcf9..000000000 --- "a/_doc/\346\217\220\344\272\244\350\241\250\345\215\225\345\271\266\345\261\225\347\244\272\345\206\205\345\256\271.md" +++ /dev/null @@ -1,29 +0,0 @@ -# 提交表单并展示内容 - -## 提交表单设置 - -1. 按照[部署编辑器](部署编辑器.md "部署编辑器")的教程,完成编辑器加载 - -2. 把容器放到form表单里面,设置好要提交的路径,如下面代码中的
标签 - -```html - - - - - ueditor demo - - - - - - - - - - - - -``` \ No newline at end of file diff --git "a/_doc/\347\274\226\350\276\221\345\206\205\345\256\271\345\261\225\347\244\272.md" "b/_doc/\347\274\226\350\276\221\345\206\205\345\256\271\345\261\225\347\244\272.md" deleted file mode 100644 index 62b5081aa..000000000 --- "a/_doc/\347\274\226\350\276\221\345\206\205\345\256\271\345\261\225\347\244\272.md" +++ /dev/null @@ -1,43 +0,0 @@ -# 编辑内容展示 - -##背景 -大家使用ueditor是为了让用户能在页面中编辑富文本内容,但这应该只是手段方法。我们最终的目的是为了呈现用户编辑的内容。也就是内容的展示。原来我们对这块是不考虑的,只关注在编辑端。但随着编辑器产出内容的增加和复杂化,比如图表展示,代码高亮,自定义的列表标号等等,如果都在最终产出的编辑数据中处理,那势必会导致产出数据带有冗余内容,而且也很大程度上硬编码了展示时定制效果。基于这些问题,**uparse**产生了。 - -## uparse的定义 -基于js的实现机制,在展示页面中,对ueditor的产出的编辑数据,进行解析和转换,以呈现不同的效果。为后边的多端(移动端和pc端)展示打下基础。 - -##uparse的作用 -它会根据内容展示内容,动态的在你的展示页中加入css代码,比如你的编辑数据中有表格,那就会加入一些表格的css样式,如果有图表数据,会调用相关的js插件,解析数据成为图表等。 - -## uparse的使用 - -1. 在下载包中找到ueditor.parse.js或者uparse.js(这两个没有区别,就是版本不同,功能是一致的).完整版本的包中,ueditor.parse.js是没有打包编译的,需要进行编译,编译相关的请看编译文档。从1.3.5开始,uparse做了重构,将原来的一个文件拆解成了多个插件形式的js,为了适应越来越多的功能需求。![现在的parse目录](images/parse.png) parse.js是核心文件,定了插件的管理机制和一些快捷方法,感兴趣的同学可以看一下。其他文件代表的一种数据解析功能,比如insertcode.js是针对的数据里边的代码进行展示时的解析等等。看到这里,大家应该能想到,uparse是需要依赖ueditor项目中的third-party中先关的第三方库的。 -2. 根据你的路径加载uparse.js -```html - - - - - -```将uparse.js记载到页面,不同目录结构,路径不同. - -3. 当加载了uparse.js后,就可以调用uParse这个函数,执行内容解析了。 -```javascript - //uParse的语法 - //uParse(cssSelector,[options]) -```cssSelector,是告诉uParse你将编辑数据放到那个容器里了,比如你放到一个div里```html

dsfsdF

sdsdf

```cssSelector就是#content,现在支持3种格式,tag,id,class.也就是你可以渲染页面中多个地方。options是个json对象。基于1.3.5版本,可配置的参数。 -```javascript -{rootPath:'', //ueditor所在的路径,这个要给出,让uparse能找到third-party目录 - //因为需要引入目录下的那些js文件,当然会根据你的编辑数据,按需加载 - liiconpath : 'http://bs.baidu.com/listicon/', //自定义列表标号图片的地址,默认是这个地址 - listDefaultPaddingLeft : '20'//自定义列表标号与文字的横向间距 -} -```一般只要给个rootPath就够了,其他的都可以使用默认值。一般在页面底部加入如下代码 -```javascript - uParse('.content',{ - rootPath : '../' - })```这个表示对于className是content的容器里边的内容进行解析。 - -##小结 -我们是建议用户使用uparse来解析展示页中的数据的,当然你也可以给出自己针对某些标签的自定义样式,这个跟uparse是不冲突的.随着可编辑内容的丰富和复杂,展示数据也会变得越来越复杂和难以维护,而且多端展示的需求也越来越强烈。展现数据会变得需要做更多的事情。欢迎大家跟我们进行探讨。 - \ No newline at end of file diff --git "a/_doc/\351\203\250\347\275\262\347\274\226\350\276\221\345\231\250.md" "b/_doc/\351\203\250\347\275\262\347\274\226\350\276\221\345\231\250.md" deleted file mode 100644 index b0d924cfe..000000000 --- "a/_doc/\351\203\250\347\275\262\347\274\226\350\276\221\345\231\250.md" +++ /dev/null @@ -1,43 +0,0 @@ -# 部署编辑器 - -## 编辑器目录说明 - -1. 到官网下载ueditor最新版: [官网地址](http://ueditor.baidu.com/website/download.html#ueditor "ueditor官网地址") - -2. 解压后的文件目录结构如下所示 - - ![ueditor解压后的目录列表](images/sourcedir.png) - -3. 目录和文件说明: - - * dialogs:弹出对话框对应的资源和JS文件 - * lang:编辑器国际化显示的文件 - * php或jsp或net:涉及到服务器端操作的后台文件 - * themes:样式图片和样式文件 - * third-party:第三方插件(包括代码高亮,源码编辑等组件) - * ueditor.all.js:开发版代码合并的结果,目录下所有文件的打包文件 - * ueditor.all.min.js:ueditor.all.js文件的压缩版,建议在正式部署时采用 - * ueditor.config.js:编辑器的配置文件,建议和编辑器实例化页面置于同一目录 - * ueditor.parse.js:编辑的内容显示页面引用,会自动加载表格、列表、代码高亮等样式 - * ueditor.all.min.js:ueditor.parse.js文件的压缩版,建议在内容展示页正式部署时采用 - -4. 在你页面head内,引用ueditor文件、配置文件和语言包文件。插入下面的代码,修改引用路文件的路径。 -```html - - - - - - -``` - -5. 然后在代码文件中设置编辑器容器,并添加编辑器的实例化代码。具体代码示例如下。 -```html - - -``` - -6. 如果看到了下面这样的编辑器,说明已经部署成功! -![demo.png](images/demo.png) diff --git a/_examples/addCustomizeButton.js b/_examples/addCustomizeButton.js new file mode 100644 index 000000000..4daa6d2dc --- /dev/null +++ b/_examples/addCustomizeButton.js @@ -0,0 +1,72 @@ +UE.registerUI('button',function(editor,uiName){ + //注册按钮执行时的command命令,使用命令默认就会带有回退操作 + editor.registerCommand(uiName,{ + execCommand:function(){ + alert('execCommand:' + uiName) + } + }); + + //创建一个button + var btn = new UE.ui.Button({ + //按钮的名字 + name:uiName, + //提示 + title:uiName, + //需要添加的额外样式,指定icon图标,这里默认使用一个重复的icon + cssRules :'background-position: -500px 0;', + //点击时执行的命令 + onclick:function () { + //这里可以不用执行命令,做你自己的操作也可 + editor.execCommand(uiName); + } + }); + + //当点到编辑内容上时,按钮要做的状态反射 + editor.addListener('selectionchange', function () { + var state = editor.queryCommandState(uiName); + if (state == -1) { + btn.setDisabled(true); + btn.setChecked(false); + } else { + btn.setDisabled(false); + btn.setChecked(state); + } + }); + + //因为你是添加button,所以需要返回这个button + return btn; +}/*index 指定添加到工具栏上的那个位置,默认时追加到最后,editorId 指定这个UI是那个编辑器实例上的,默认是页面上所有的编辑器都会添加这个按钮*/); + +//自定义引用样式例子 +UE.registerUI('myblockquote',function(editor,uiName){ + editor.registerCommand(uiName,{ + execCommand:function(){ + this.execCommand('blockquote',{ + "style":"border-left: 3px solid #E5E6E1; margin-left: 0px; padding-left: 5px; line-height:36px;" + }); + } + }); + + var btn = new UE.ui.Button({ + name:uiName, + title:'自定义引用', + cssRules :"background-position: -220px 0;", + onclick:function () { + editor.execCommand(uiName); + } + }); + + editor.addListener('selectionchange', function () { + console.log(this); + var state = editor.queryCommandState('blockquote'); + if (state == -1) { + btn.setDisabled(true); + btn.setChecked(false); + } else { + btn.setDisabled(false); + btn.setChecked(state); + } + }); + + return btn; +}); diff --git a/_examples/addCustomizeCombox.js b/_examples/addCustomizeCombox.js new file mode 100644 index 000000000..fc272abce --- /dev/null +++ b/_examples/addCustomizeCombox.js @@ -0,0 +1,69 @@ +UE.registerUI('combox',function(editor,uiName){ + //注册按钮执行时的command命令,用uiName作为command名字,使用命令默认就会带有回退操作 + editor.registerCommand(uiName,{ + execCommand:function(cmdName,value){ + //这里借用fontsize的命令 + this.execCommand('fontsize',value + 'px') + }, + queryCommandValue:function(){ + //这里借用fontsize的查询命令 + return this.queryCommandValue('fontsize') + } + }); + + + //创建下拉菜单中的键值对,这里我用字体大小作为例子 + var items = []; + for(var i= 0,ci;ci=[10, 11, 12, 14, 16, 18, 20, 24, 36][i++];){ + items.push({ + //显示的条目 + label:'字体:' + ci + 'px', + //选中条目后的返回值 + value:ci, + //针对每个条目进行特殊的渲染 + renderLabelHtml:function () { + //这个是希望每个条目的字体是不同的 + return '
' + (this.label || '') + '
'; + } + }); + } + //创建下来框 + var combox = new UE.ui.Combox({ + //需要指定当前的编辑器实例 + editor:editor, + //添加条目 + items:items, + //当选中时要做的事情 + onselect:function (t, index) { + //拿到选中条目的值 + editor.execCommand(uiName, this.items[index].value); + }, + //提示 + title:uiName, + //当编辑器没有焦点时,combox默认显示的内容 + initValue:uiName + }); + + editor.addListener('selectionchange', function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState(uiName); + if (state == -1) { + combox.setDisabled(true); + } else { + combox.setDisabled(false); + var value = editor.queryCommandValue(uiName); + if(!value){ + combox.setValue(uiName); + return; + } + //ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 + value && (value = value.replace(/['"]/g, '').split(',')[0]); + combox.setValue(value); + + } + } + + }); + return combox; +},2/*index 指定添加到工具栏上的那个位置,默认时追加到最后,editorId 指定这个UI是那个编辑器实例上的,默认是页面上所有的编辑器都会添加这个按钮*/); \ No newline at end of file diff --git a/_examples/addCustomizeDialog.js b/_examples/addCustomizeDialog.js new file mode 100644 index 000000000..6b8655556 --- /dev/null +++ b/_examples/addCustomizeDialog.js @@ -0,0 +1,49 @@ +UE.registerUI('dialog',function(editor,uiName){ + + //创建dialog + var dialog = new UE.ui.Dialog({ + //指定弹出层中页面的路径,这里只能支持页面,因为跟addCustomizeDialog.js相同目录,所以无需加路径 + iframeUrl:'customizeDialogPage.html', + //需要指定当前的编辑器实例 + editor:editor, + //指定dialog的名字 + name:uiName, + //dialog的标题 + title:"这是个测试浮层", + + //指定dialog的外围样式 + cssRules:"width:600px;height:300px;", + + //如果给出了buttons就代表dialog有确定和取消 + buttons:[ + { + className:'edui-okbutton', + label:'确定', + onclick:function () { + dialog.close(true); + } + }, + { + className:'edui-cancelbutton', + label:'取消', + onclick:function () { + dialog.close(false); + } + } + ]}); + + //参考addCustomizeButton.js + var btn = new UE.ui.Button({ + name:'dialogbutton' + uiName, + title:'dialogbutton' + uiName, + //需要添加的额外样式,指定icon图标,这里默认使用一个重复的icon + cssRules :'background-position: -500px 0;', + onclick:function () { + //渲染dialog + dialog.render(); + dialog.open(); + } + }); + + return btn; +}/*index 指定添加到工具栏上的那个位置,默认时追加到最后,editorId 指定这个UI是那个编辑器实例上的,默认是页面上所有的编辑器都会添加这个按钮*/); \ No newline at end of file diff --git a/_examples/completeDemo.html b/_examples/completeDemo.html index 217b023d4..a25959c6b 100755 --- a/_examples/completeDemo.html +++ b/_examples/completeDemo.html @@ -1,4 +1,5 @@ - + 完整demo @@ -10,8 +11,8 @@ @@ -41,7 +42,7 @@

完整demo

- +
@@ -51,18 +52,17 @@

完整demo

- -
- + \ No newline at end of file diff --git a/_examples/customToolbarDemo.html b/_examples/customToolbarDemo.html index 201b446aa..b3437b303 100755 --- a/_examples/customToolbarDemo.html +++ b/_examples/customToolbarDemo.html @@ -58,7 +58,7 @@

UEditor自定义toolbar

+ + + \ No newline at end of file diff --git a/_examples/customizeToolbarUIDemo.html b/_examples/customizeToolbarUIDemo.html new file mode 100755 index 000000000..94b24c856 --- /dev/null +++ b/_examples/customizeToolbarUIDemo.html @@ -0,0 +1,43 @@ + + + + 完整demo + + + + + + + + + + + + + + + + +
+

二次开发demo

+ +
+ + + \ No newline at end of file diff --git a/_examples/editor_api.js b/_examples/editor_api.js index d31fac21e..54b81bdf1 100755 --- a/_examples/editor_api.js +++ b/_examples/editor_api.js @@ -12,12 +12,16 @@ 'core/Range.js', 'core/Selection.js', 'core/Editor.js', + 'core/Editor.defaultoptions.js', + 'core/loadconfig.js', 'core/ajax.js', 'core/filterword.js', 'core/node.js', 'core/htmlparser.js', 'core/filternode.js', 'core/plugin.js', + 'core/keymap.js', + 'core/localstorage.js', 'plugins/defaultfilter.js', 'plugins/inserthtml.js', 'plugins/autotypeset.js', @@ -34,6 +38,7 @@ 'plugins/convertcase.js', 'plugins/indent.js', 'plugins/print.js', + 'plugins/preview.js', 'plugins/selectall.js', 'plugins/paragraph.js', 'plugins/directionality.js', @@ -49,7 +54,9 @@ 'plugins/wordimage.js', 'plugins/dragdrop.js', 'plugins/undo.js', + 'plugins/copy.js', 'plugins/paste.js', + 'plugins/puretxtpaste.js', 'plugins/list.js', 'plugins/source.js', 'plugins/enterkey.js', @@ -58,7 +65,6 @@ 'plugins/autolink.js', 'plugins/autoheight.js', 'plugins/autofloat.js', - 'plugins/puretxtpaste.js', 'plugins/video.js', 'plugins/table.core.js', 'plugins/table.cmds.js', @@ -81,6 +87,9 @@ 'plugins/autosave.js', 'plugins/charts.js', 'plugins/section.js', + 'plugins/simpleupload.js', + 'plugins/serverparam.js', + 'plugins/insertfile.js', 'ui/ui.js', 'ui/uiutils.js', 'ui/uibase.js', @@ -103,11 +112,15 @@ 'ui/combox.js', 'ui/dialog.js', 'ui/menubutton.js', - 'ui/editorui.js', - 'ui/editor.js', 'ui/multiMenu.js', 'ui/shortcutmenu.js', - 'ui/breakline.js' + 'ui/breakline.js', + 'ui/message.js', + 'adapter/editorui.js', + 'adapter/editor.js', + 'adapter/message.js', + 'adapter/autosave.js' + ], baseURL = '../_src/'; for (var i=0,pi;pi = paths[i++];) { diff --git a/_examples/index.html b/_examples/index.html index 12b876f37..cb61cfec1 100755 --- a/_examples/index.html +++ b/_examples/index.html @@ -29,10 +29,6 @@

基础示例

应用展示

+

二次开发

+

高级案例