',
15 | defaultOpt: {
16 | color: ''
17 | },
18 | init: function( options ){
19 |
20 | var me = this;
21 |
22 | me.supper.init.call( me, options );
23 |
24 | },
25 | colorLabel: function(){
26 | return this.root().find('.edui-splitbutton-color-label');
27 | }
28 |
29 | }, 'splitbutton');
--------------------------------------------------------------------------------
/_src/ui/menu.js:
--------------------------------------------------------------------------------
1 | //menu 类
2 | UM.ui.define('menu',{
3 | show : function($obj,dir,fnname,topOffset,leftOffset){
4 |
5 | fnname = fnname || 'position';
6 | if(this.trigger('beforeshow') === false){
7 | return;
8 | }else{
9 | this.root().css($.extend({display:'block'},$obj ? {
10 | top : $obj[fnname]().top + ( dir == 'right' ? 0 : $obj.outerHeight()) - (topOffset || 0),
11 | left : $obj[fnname]().left + (dir == 'right' ? $obj.outerWidth() : 0) - (leftOffset || 0)
12 | }:{}))
13 | this.trigger('aftershow');
14 | }
15 | },
16 | hide : function(all){
17 | var $parentmenu;
18 | if(this.trigger('beforehide') === false){
19 | return;
20 | } else {
21 |
22 | if($parentmenu = this.root().data('parentmenu')){
23 | if($parentmenu.data('parentmenu')|| all)
24 | $parentmenu.edui().hide();
25 | }
26 | this.root().css('display','none');
27 | this.trigger('afterhide');
28 | }
29 | },
30 | attachTo : function($obj){
31 | var me = this;
32 | if(!$obj.data('$mergeObj')){
33 | $obj.data('$mergeObj',me.root());
34 | $obj.on('wrapclick',function(evt){
35 | me.show()
36 | });
37 | me.register('click',$obj,function(evt){
38 | me.hide()
39 | });
40 | me.data('$mergeObj',$obj)
41 | }
42 | }
43 | });
--------------------------------------------------------------------------------
/_src/ui/popup.js:
--------------------------------------------------------------------------------
1 | //popup 类
2 | UM.ui.define('popup', {
3 | tpl: '',
8 | defaultOpt: {
9 | stopprop:false,
10 | subtpl: '',
11 | width: '',
12 | height: ''
13 | },
14 | init: function (options) {
15 | this.root($($.parseTmpl(this.tpl, options)));
16 | return this;
17 | },
18 | mergeTpl: function (data) {
19 | return $.parseTmpl(this.tpl, {subtpl: data});
20 | },
21 | show: function ($obj, posObj) {
22 | if (!posObj) posObj = {};
23 |
24 | var fnname = posObj.fnname || 'position';
25 | if (this.trigger('beforeshow') === false) {
26 | return;
27 | } else {
28 | this.root().css($.extend({display: 'block'}, $obj ? {
29 | top: $obj[fnname]().top + ( posObj.dir == 'right' ? 0 : $obj.outerHeight()) - (posObj.offsetTop || 0),
30 | left: $obj[fnname]().left + (posObj.dir == 'right' ? $obj.outerWidth() : 0) - (posObj.offsetLeft || 0),
31 | position: 'absolute'
32 | } : {}));
33 |
34 | this.root().find('.edui-popup-caret').css({
35 | top: posObj.caretTop || 0,
36 | left: posObj.caretLeft || 0,
37 | position: 'absolute'
38 | }).addClass(posObj.caretDir || "up")
39 |
40 | }
41 | this.trigger("aftershow");
42 | },
43 | hide: function () {
44 | this.root().css('display', 'none');
45 | this.trigger('afterhide')
46 | },
47 | attachTo: function ($obj, posObj) {
48 | var me = this
49 | if (!$obj.data('$mergeObj')) {
50 | $obj.data('$mergeObj', me.root());
51 | $obj.on('wrapclick', function (evt) {
52 | me.show($obj, posObj)
53 | });
54 | me.register('click', $obj, function (evt) {
55 | me.hide()
56 | });
57 | me.data('$mergeObj', $obj)
58 | }
59 | },
60 | getBodyContainer: function () {
61 | return this.root().find(".edui-popup-body");
62 | }
63 | });
--------------------------------------------------------------------------------
/_src/ui/separator.js:
--------------------------------------------------------------------------------
1 | //button 类
2 | UM.ui.define('separator', {
3 | tpl: '
',
4 | init: function (options) {
5 | var me = this;
6 | me.root($($.parseTmpl(me.tpl, options)));
7 | return me;
8 | }
9 | });
--------------------------------------------------------------------------------
/_src/ui/splitbutton.js:
--------------------------------------------------------------------------------
1 | //splitbutton 类
2 | ///import button
3 | UM.ui.define('splitbutton',{
4 | tpl :'
data-original-title="<%=title%>"<%}%>>
<%if(icon){%>
<%}%><%if(text){%><%=text%><%}%>
'+
5 | '
'+
6 | '
<\/div>'+
7 | '
'+
8 | '
',
9 | defaultOpt:{
10 | text:'',
11 | title:'',
12 | click:function(){}
13 | },
14 | init : function(options){
15 | var me = this;
16 | me.root( $($.parseTmpl(me.tpl,options)));
17 | me.root().find('.edui-btn:first').click(function(evt){
18 | if(!me.disabled()){
19 | $.proxy(options.click,me)();
20 | }
21 | });
22 | me.root().find('.edui-dropdown-toggle').click(function(){
23 | if(!me.disabled()){
24 | me.trigger('arrowclick')
25 | }
26 | });
27 | me.root().hover(function () {
28 | if(!me.root().hasClass("edui-disabled")){
29 | me.root().toggleClass('edui-hover')
30 | }
31 | });
32 |
33 | return me;
34 | },
35 | wrapclick:function(fn,evt){
36 | if(!this.disabled()){
37 | $.proxy(fn,this,evt)()
38 | }
39 | return this;
40 | },
41 | disabled : function(state){
42 | if(state === undefined){
43 | return this.root().hasClass('edui-disabled')
44 | }
45 | this.root().toggleClass('edui-disabled',state).find('.edui-btn').toggleClass('edui-disabled',state);
46 | return this;
47 | },
48 | active:function(state){
49 | if(state === undefined){
50 | return this.root().hasClass('edui-active')
51 | }
52 | this.root().toggleClass('edui-active',state).find('.edui-btn:first').toggleClass('edui-active',state);
53 | return this;
54 | },
55 | mergeWith:function($obj){
56 | var me = this;
57 | me.data('$mergeObj',$obj);
58 | $obj.edui().data('$mergeObj',me.root());
59 | if(!$.contains(document.body,$obj[0])){
60 | $obj.appendTo(me.root());
61 | }
62 | me.root().delegate('.edui-dropdown-toggle','click',function(){
63 | me.wrapclick(function(){
64 | $obj.edui().show();
65 | })
66 | });
67 | me.register('click',me.root().find('.edui-dropdown-toggle'),function(evt){
68 | $obj.hide()
69 | });
70 | }
71 | });
--------------------------------------------------------------------------------
/_src/ui/tab.js:
--------------------------------------------------------------------------------
1 | /*tab 类*/
2 | UM.ui.define('tab', {
3 | init: function (options) {
4 | var me = this,
5 | slr = options.selector;
6 |
7 | if ($.type(slr)) {
8 | me.root($(slr, options.context));
9 | me.data("context", options.context);
10 |
11 | $(slr, me.data("context")).on('click', function (e) {
12 | me.show(e);
13 | });
14 | }
15 | },
16 | show: function (e) {
17 |
18 | var me = this,
19 | $cur = $(e.target),
20 | $ul = $cur.closest('ul'),
21 | selector,
22 | previous,
23 | $target,
24 | e;
25 |
26 | selector = $cur.attr('data-context');
27 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '');
28 |
29 | var $tmp = $cur.parent('li');
30 |
31 | if (!$tmp.length || $tmp.hasClass('edui-active')) return;
32 |
33 | previous = $ul.find('.edui-active:last a')[0];
34 |
35 | e = $.Event('beforeshow', {
36 | target: $cur[0],
37 | relatedTarget: previous
38 | });
39 |
40 | me.trigger(e);
41 |
42 | if (e.isDefaultPrevented()) return;
43 |
44 | $target = $(selector, me.data("context"));
45 |
46 | me.activate($cur.parent('li'), $ul);
47 | me.activate($target, $target.parent(), function () {
48 | me.trigger({
49 | type: 'aftershow', relatedTarget: previous
50 | })
51 | });
52 | },
53 | activate: function (element, container, callback) {
54 | if (element === undefined) {
55 | return $(".edui-tab-item.edui-active",this.root()).index();
56 | }
57 |
58 | var $active = container.find('> .edui-active');
59 |
60 | $active.removeClass('edui-active');
61 |
62 | element.addClass('edui-active');
63 |
64 | callback && callback();
65 | }
66 | });
67 |
68 |
--------------------------------------------------------------------------------
/_src/ui/toolbar.js:
--------------------------------------------------------------------------------
1 | //toolbar 类
2 | (function () {
3 | UM.ui.define('toolbar', {
4 | tpl: '
'
5 | ,
6 | init: function () {
7 | var $root = this.root($(this.tpl));
8 | this.data('$btnToolbar', $root.find('.edui-btn-toolbar'))
9 | },
10 | appendToBtnmenu : function(data){
11 | var $cont = this.data('$btnToolbar');
12 | data = $.isArray(data) ? data : [data];
13 | $.each(data,function(i,$item){
14 | $cont.append($item)
15 | })
16 | }
17 | });
18 | })();
19 |
--------------------------------------------------------------------------------
/_src/ui/tooltip.js:
--------------------------------------------------------------------------------
1 | /*tooltip 类*/
2 | UM.ui.define('tooltip', {
3 | tpl: '
',
7 | init: function (options) {
8 | var me = this;
9 | me.root($($.parseTmpl(me.tpl, options || {})));
10 | },
11 | content: function (e) {
12 | var me = this,
13 | title = $(e.currentTarget).attr("data-original-title");
14 |
15 | me.root().find('.edui-tooltip-inner')['text'](title);
16 | },
17 | position: function (e) {
18 | var me = this,
19 | $obj = $(e.currentTarget);
20 |
21 | me.root().css($.extend({display: 'block'}, $obj ? {
22 | top: $obj.outerHeight(),
23 | left: (($obj.outerWidth() - me.root().outerWidth()) / 2)
24 | } : {}))
25 | },
26 | show: function (e) {
27 | if ($(e.currentTarget).hasClass('edui-disabled')) return;
28 |
29 | var me = this;
30 | me.content(e);
31 | me.root().appendTo($(e.currentTarget));
32 | me.position(e);
33 | me.root().css('display', 'block');
34 | },
35 | hide: function () {
36 | var me = this;
37 | me.root().css('display', 'none')
38 | },
39 | attachTo: function ($obj) {
40 | var me = this;
41 |
42 | function tmp($obj) {
43 | var me = this;
44 |
45 | if (!$.contains(document.body, me.root()[0])) {
46 | me.root().appendTo($obj);
47 | }
48 |
49 | me.data('tooltip', me.root());
50 |
51 | $obj.each(function () {
52 | if ($(this).attr("data-original-title")) {
53 | $(this).on('mouseenter', $.proxy(me.show, me))
54 | .on('mouseleave click', $.proxy(me.hide, me))
55 |
56 | }
57 | });
58 |
59 | }
60 |
61 | if ($.type($obj) === "undefined") {
62 | $("[data-original-title]").each(function (i, el) {
63 | tmp.call(me, $(el));
64 | })
65 |
66 | } else {
67 | if (!$obj.data('tooltip')) {
68 | tmp.call(me, $obj);
69 | }
70 | }
71 | }
72 | });
73 |
--------------------------------------------------------------------------------
/_test/adapter/autofloat.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-8-19
5 | * Time: 下午4:33
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'adapter.autofloat' );
9 | test( '检查toolbar是否浮动在页面顶端', function() {
10 | var sc = document.createElement("script");
11 | sc.id="sc";
12 | sc.type = "text/plain";
13 | document.body.appendChild(sc);
14 | var me = UM.getEditor(sc.id, {autoFloatEnabled:true,initialFrameWidth:800,initialFrameHeight:100,autoHeightEnabled:true});
15 | stop();
16 | me.ready(function(){
17 | me.setContent('
sdf
');
18 | var screenX = window.screenX || window.screenLeft;//不同浏览器兼容
19 | var screenY = window.screenY || window.screenTop;
20 | setTimeout(function () {
21 | var range = new UM.dom.Range(me.document,me.body);
22 | range.setStart(me.body.firstChild, 1).collapse(1).select();
23 | me.focus();
24 | setTimeout(function () {
25 | window.scrollBy(screenX, screenY + $(document.body).height());
26 | setTimeout(function () {
27 | var $eduiToolbar = me.$container.find('.edui-toolbar'),
28 | getScrollTop = function(){
29 | return document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;//不同浏览器兼容
30 | };
31 |
32 | if(ua.browser.ie != 6) { //ie6下,工具栏浮动不到正确位置
33 | equal(getScrollTop(), $eduiToolbar.offset().top, '检查toolbar是否在页面顶端');
34 | }
35 | window.scrollTo(screenX, screenY - $(document.body).height());
36 | setTimeout(function () {
37 | equal(me.$container.children()[0].className, me.$container.find('.edui-toolbar')[0].className, 'toolbar是第一个元素');
38 | document.getElementById('sc').parentNode.removeChild(document.getElementById('sc'));
39 | start();
40 | }, 500);
41 | }, 500);
42 | }, 200);
43 | }, 200);
44 | });
45 | });
--------------------------------------------------------------------------------
/_test/adapter/button.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-8-19
5 | * Time: 下午5:17
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'adapter.button' );
9 |
10 | test( '判断有没有触发fullscreenchanged事件', function () {
11 | var editor = te.obj[0];
12 | var div = te.dom[0];
13 |
14 | editor.ready(function(){
15 | var $btn = editor.$container.find('.edui-btn-bold');
16 | equal($btn.edui().disabled(), editor.queryCommandState('bold') == -1, '判断初始化后ui对象disable状态是否正常');
17 | equal($btn.edui().active(), editor.queryCommandState('bold') == 1, '判断初始化后ui对象active状态是否正常');
18 | editor.focus();
19 | $btn.click();//直接用$btn.click()在ie8下,模拟有问题,要先focus,不然document找不对
20 | setTimeout(function(){
21 | equal($btn.edui().disabled(), editor.queryCommandState('bold') == -1, '判断点击加粗后ui对象disable状态是否正常');
22 | equal($btn.edui().active(), editor.queryCommandState('bold') == 1, '判断点击加粗后ui对象active状态是否正常');
23 | start();
24 | },200);
25 | });
26 | stop();
27 | });
--------------------------------------------------------------------------------
/_test/adapter/combobox.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-8-19
5 | * Time: 下午4:33
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'adapter.combobox' );
9 | test( '检测combobox的控制否正常', function() {
10 | var editor = te.obj[0];
11 | stop();
12 | editor.ready(function(){
13 | setTimeout(function () {
14 | var editor = te.obj[0],
15 | components = [ "paragraph", "fontfamily", "fontsize" ],
16 | $body = $(document.body),
17 | colors = [ "forecolor", "backcolor" ];
18 |
19 | for ( var i = 0, component; component = components[ i ]; i++ ) {
20 |
21 | $( ".edui-btn-name-" + component, editor.container).trigger("click");
22 |
23 | equal( $( ".edui-combobox-" + component , editor.container ).css("display"), "block", component+' combobox打开正常' );
24 |
25 | $body.trigger("click");
26 |
27 | equal( $( ".edui-combobox-" + component , editor.container ).css("display"), "none", component+' combobox关闭正常' );
28 |
29 | }
30 |
31 | for ( var i = 0, color; color = colors[ i ]; i++ ) {
32 |
33 | $( ".edui-splitbutton-"+ color +" .edui-dropdown-toggle", editor.container).trigger("click");
34 |
35 | equal( $( ".edui-colorpicker-" + color , editor.container).parents(".edui-popup").css("display"), "block", color+' combobox打开正常' );
36 |
37 | $body.trigger("click");
38 |
39 | equal( $( ".edui-colorpicker-" + color , editor.container).parents(".edui-popup").css("display"), "none", color+' combobox关闭正常' );
40 |
41 | }
42 |
43 | start();
44 |
45 | }, 200);
46 | });
47 |
48 | });
49 |
50 |
--------------------------------------------------------------------------------
/_test/adapter/dialog.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 上午10:47
6 | * To change this template use File | Settings | File Templates.
7 | */
8 |
9 | module('ui.dialog');
10 | test('检查video的按钮和弹出的dialog面板是否正常显示', function () {
11 | var editor = te.obj[0];
12 | setTimeout(function () {//这句本身没有用,但是当用例自动执行下一个时,时序上可能有问题,所以在这儿先等一下
13 | var $vedioBtn = editor.$container.find('.edui-btn-video');
14 | ok($vedioBtn.data('$mergeObj').parent()[0] === undefined, '判断点击按钮前dialog是否未插入到dom树里面');
15 | editor.focus();
16 | $vedioBtn.click();
17 | ok($vedioBtn.data('$mergeObj').parent()[0] !== undefined, '判断点击按钮后dialog是否已插入到dom树里面');
18 | $vedioBtn.click();
19 | equal($vedioBtn.edui().disabled(), editor.queryCommandState('video') == -1, '判断初始化后btn对象disable状态是否正常');
20 | equal($vedioBtn.edui().active(), editor.queryCommandState('video') == 1, '判断初始化后btn对象active状态是否正常');
21 | editor.setContent('
![]()
');
22 | setTimeout(function () {
23 | editor.execCommand('selectall');
24 | setTimeout(function () {
25 | equal($vedioBtn.edui().disabled(), editor.queryCommandState('video') == -1, '判断点击按钮后btn对象disable状态是否正常');
26 | equal($vedioBtn.edui().active(), editor.queryCommandState('video') == 1, '判断点击按钮后btn对象active状态是否正常');
27 | start();
28 | }, 100);
29 | }, 100);
30 | }, 100);
31 | stop();
32 | });
--------------------------------------------------------------------------------
/_test/adapter/fullscreen.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-8-19
5 | * Time: 下午4:33
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'adapter.fullscreen' );
9 | test( '检测全屏操作是否正常', function() {
10 | stop();
11 | setTimeout(function () {
12 | var editor = te.obj[0];
13 | if(ua.browser.ie==8){//todo trace 3628 focus有问题,select代替
14 | var range = new UM.dom.Range( editor.document ,editor.body);
15 | range.setStart(editor.body,0).collapse(true).select();
16 | }
17 | var oldState = { //切换前的状态
18 | width: editor.$container.innerWidth(),
19 | height: editor.$container.innerHeight()
20 | },
21 | //切换之后的新状态
22 | newState = {},
23 | $fullscreenBtn = $( ".edui-btn-fullscreen", editor.$container );
24 |
25 | //切换至全屏
26 | $fullscreenBtn.trigger("click");
27 |
28 | newState = {
29 | width: editor.$container.innerWidth(),
30 | height: editor.$container.innerHeight()
31 | };
32 |
33 | equal( newState.width, $( window ).width(), '切换至全屏状态后宽度正常' );
34 | equal( newState.height, $( window ).height(), '切换至全屏状态后高度正常' );
35 |
36 | equal( $fullscreenBtn.hasClass( "edui-active" ), true, '切换至全屏状态后按钮状态正常' );
37 |
38 | //模拟resize
39 | $( window ).trigger( "resize" );
40 | equal( newState.width, $( window ).width(), 'resize后宽度正常' );
41 | equal( newState.height, $( window ).height(), 'resize后高度正常' );
42 |
43 |
44 | //退出全屏
45 | $fullscreenBtn.trigger("click");
46 |
47 | newState = {
48 | width: editor.$container.innerWidth(),
49 | height: editor.$container.innerHeight()
50 | };
51 |
52 | equal( newState.width, oldState.width, '退出全屏状态后宽度正常' );
53 | equal( newState.height, oldState.height, '退出全屏状态后高度正常' );
54 |
55 | equal( $fullscreenBtn.hasClass( "active" ), false, '退出全屏状态后按钮状态正常' );
56 |
57 | //模拟resize
58 | $( window ).trigger( "resize" );
59 | equal( newState.width, oldState.width, 'resize后宽度未改变' );
60 | equal( newState.height, oldState.height, 'resize后高度未改变' );
61 | start();
62 | }, 500);
63 | });
64 |
65 |
--------------------------------------------------------------------------------
/_test/adapter/popup.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-8-20
5 | * Time: 下午7:13
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module('ui.popup');
9 | test('检查表情的pupop显示是否正常', function () {
10 | var editor = te.obj[0];
11 | setTimeout(function () {//这句本身没有用,但是当用例自动执行下一个时,时序上可能有问题,所以在这儿先等一下
12 | var $emotionBtn = editor.$container.find('.edui-btn-emotion');
13 | ok($emotionBtn.data('$mergeObj').parent()[0] === undefined, '判断点击按钮前pupop是否未插入到dom树里面');
14 | editor.focus();
15 | $emotionBtn.click();
16 | ok($emotionBtn.data('$mergeObj').parent()[0] !== undefined, '判断点击按钮后pupop是否已插入到dom树里面');
17 |
18 | equal($emotionBtn.edui().disabled(), editor.queryCommandState('emotion') == -1, '判断初始化后btn对象disable状态是否正常');
19 | equal($emotionBtn.edui().active(), editor.queryCommandState('emotion') == 1, '判断初始化后btn对象active状态是否正常');
20 | editor.focus();
21 | $emotionBtn.click();
22 | setTimeout(function () {
23 | equal($emotionBtn.edui().disabled(), editor.queryCommandState('emotion') == -1, '判断点击按钮后btn对象disable状态是否正常');
24 | equal($emotionBtn.edui().active(), editor.queryCommandState('emotion') == 1, '判断点击按钮后btn对象active状态是否正常');
25 | start();
26 | }, 100);
27 | }, 50);
28 | stop();
29 | });
--------------------------------------------------------------------------------
/_test/adapter/source.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-8-19
5 | * Time: 下午5:17
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'adapter.source' );
9 |
10 | test( '判断有没有触发fullscreenchanged事件', function () {
11 | var editor = te.obj[0];
12 | editor.focus();
13 | editor.execCommand('source');
14 | setTimeout(function () {
15 | var $textarea = editor.$container.find('textarea');
16 | editor.fireEvent('fullscreenchanged');
17 | setTimeout(function () {
18 | equal($textarea.width(), editor.$body.width() - 10, "textarea的宽是否正确");
19 | equal($textarea.height(), editor.$body.height(), "textarea的高是否正确");
20 | start();
21 | }, 100);
22 | }, 100);
23 | stop();
24 | });
--------------------------------------------------------------------------------
/_test/adapter/tools.js:
--------------------------------------------------------------------------------
1 | /**
2 |
3 | */
4 | (function () {
5 | function mySetup() {
6 | for (var config in window.UMDITOR_CONFIG) {
7 | if (typeof(window.UMDITOR_CONFIG[config]) == 'string')
8 | window.UMDITOR_CONFIG[config] = window.UMDITOR_CONFIG[config].replace('_test/tools/br/', '');
9 | }
10 | var div = document.body.appendChild(document.createElement('div'));
11 | $(div).css('width', '500px').css('height', '500px').css('border', '1px solid #ccc').attr('id', 'testeditor');
12 | var editor = UM.getEditor(div.id, {'initialContent':'
欢迎使用umeditor
', 'autoFloatEnabled':false,webAppKey:'Qr0M9yTEoLIiUSXXQTtq7yFt'});
13 | var ue = new UM.Editor({'UEDITOR_HOME_URL':'../../../', 'autoFloatEnabled':true,webAppKey:'Qr0M9yTEoLIiUSXXQTtq7yFt'});
14 | QUnit.readyFlag =0;
15 | stop();
16 | setTimeout(function(){
17 | editor.ready(function () {
18 | var range = new UM.dom.Range(editor.document,editor.body);
19 | te.dom.push(div);
20 | te.obj.push(editor);
21 | te.obj.push(range);
22 | te.obj.push(ue);
23 | QUnit.readyFlag =1;
24 | });
25 | },50);
26 | document.getElementsByClassName = function (eleClassName) {
27 | var getEleClass = [];//定义一个数组
28 | var myclass = new RegExp("\\b" + eleClassName + "\\b");//创建一个正则表达式对像
29 | var elem = this.getElementsByTagName("*");//获取文档里所有的元素
30 | for (var h = 0; h < elem.length; h++) {
31 | var classes = elem[h].className;//获取class对像
32 | if (myclass.test(classes)) getEleClass.push(elem[h]);//正则比较,取到想要的CLASS对像
33 | }
34 | return getEleClass;//返回数组
35 | }
36 | }
37 |
38 | var _d = function () {
39 | UM.clearCache('testeditor');
40 | te.dom.push(te.obj[0].container);
41 | document.getElementById('testeditor')&&te.dom.push(document.getElementById('testeditor'));
42 | if (te) {
43 | if (te.dom && te.dom.length) {
44 | for (var i = 0; i < te.dom.length; i++) {
45 | if (te.dom[i] && te.dom[i].parentNode)
46 | te.dom[i].parentNode.removeChild(te.dom[i]);
47 | }
48 |
49 | }
50 | }
51 | te.dom = [];
52 | te.obj = [];
53 | }
54 | var s = QUnit.testStart, d = QUnit.testDone;
55 | QUnit.testStart = function () {
56 | s.apply(this, arguments);
57 | mySetup();
58 | };
59 | QUnit.testDone = function () {
60 | _d();
61 | d.apply(this, arguments);
62 | }
63 | })();
--------------------------------------------------------------------------------
/_test/core/browser.js:
--------------------------------------------------------------------------------
1 | module( "core.browser" );
2 |
3 |
4 | test( 'browser', function() {
5 | var browser = UM.browser;
6 | /*ie*/
7 | if ( browser.ie ) {
8 | ok(true, 'is ie' );
9 | var version = ua.browser.ie;
10 | if(browser.version == 11){
11 | equal( browser.version, ua.browser.ie, 'check ie version' );
12 | }
13 | if ( browser.version < 7 ) {
14 | ok( browser.ie6Compat, 'ie6 compat mode' );
15 | equal( version, browser.version, 'check ie version' );
16 | }
17 | if ( browser.version == 7 ) {
18 | ok( browser.ie7Compat, 'ie7 compat mode' );
19 | equal( version, browser.version, 'check ie version' );
20 | ok( browser.isCompatible, 'is compatible' );
21 | }
22 | switch ( document.documentMode ) {
23 | case 7:
24 | ok( browser.ie7Compat, 'ie7 document Mode' );
25 | equal( version, browser.version, 'check ie version' );
26 | ok( browser.isCompatible, 'is compatible' );
27 | break;
28 | case 8:
29 | ok( browser.ie8Compat, 'ie8 document Mode' );
30 | equal( version, browser.version, 'check ie version' );
31 | ok( browser.isCompatible, 'is compatible' );
32 | break;
33 | case 9:
34 | ok( browser.ie9Compat, 'ie9 document Mode' );
35 | equal( version, browser.version, 'check ie version' );
36 | ok( browser.isCompatible, 'is compatible' );
37 | break;
38 | }
39 | }
40 | /*opera*/
41 | if ( browser.opera ) {
42 | ok( ua.browser.opera, 'is opera' );
43 | equal( browser.version, ua.browser.opera, 'check opera version' );
44 | }
45 | /*webKit*/
46 | if ( browser.webkit ) {
47 | ok( ua.browser.webkit, 'is webkit' );
48 | equal( browser.webkit, ua.browser.webkit>0, 'check webkit version' );
49 | }
50 | /*gecko*/
51 | if ( browser.gecko ) {
52 | ok( ua.browser.gecko, 'is gecko' );
53 | equal( browser.gecko, !!ua.browser.gecko, 'check gecko version' );
54 | }
55 | // /*air*/
56 | // if ( browser.air ) {
57 | // ok( ua.browser.air, 'is air' );
58 | // equal( browser.air, ua.browser.air>0, 'check air version' );
59 | // }
60 | // /*mac*/
61 | // if ( browser.mac ) {
62 | // ok( ua.browser.air, 'is air' );
63 | // equal( ua.browser.os, 'macintosh', 'check air version' );
64 | // }
65 | /*quirks*/
66 | if ( browser.quirks ) {
67 | equal( document.compatMode, 'BackCompat', 'is quirks mode' );
68 | equal( browser.version, 6, 'ie version is 6' );
69 | }
70 | } );
71 |
--------------------------------------------------------------------------------
/_test/core/tools.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | function mySetup() {
3 | for (var config in window.UMDITOR_CONFIG) {
4 | if (typeof(window.UMDITOR_CONFIG[config]) == 'string')
5 | window.UMDITOR_CONFIG[config] = window.UMDITOR_CONFIG[config].replace('_test/tools/br/', '');
6 | }
7 |
8 | var div = document.body.appendChild(document.createElement('div'));
9 | div.id = 'test1';
10 | var utils = UM.utils;
11 | var editor = new UM.Editor({'UEDITOR_HOME_URL':'../../../', 'autoFloatEnabled':false});
12 | var iframe = document.createElement('iframe');
13 | document.body.appendChild(iframe);
14 | iframe.id = 'iframe';
15 | var range = new UM.dom.Range(document,document.body);
16 | var domUtils = UM.dom.domUtils;
17 | var div_dom = document.body.appendChild(document.createElement('div'));
18 | div_dom.id = 'test';
19 | te.dom.push(div);
20 | te.dom.push(iframe);
21 | te.dom.push(div_dom);
22 | te.obj.push(utils);
23 | te.obj.push(editor);
24 | te.obj.push(range);
25 | te.obj.push(domUtils);
26 | }
27 | var _d = function () {
28 |
29 | if (te) {
30 | if (te.dom && te.dom.length) {
31 | for (var i = 0; i < te.dom.length; i++) {
32 | if (te.dom[i] && te.dom[i].parentNode)
33 | te.dom[i].parentNode.removeChild(te.dom[i]);
34 | }
35 |
36 | }
37 | }
38 | te.dom = [];
39 | te.obj = [];
40 | };
41 | var s = QUnit.testStart, d = QUnit.testDone;
42 | QUnit.testStart = function () {
43 | s.apply(this, arguments);
44 | mySetup();
45 | };
46 | QUnit.testDone = function () {
47 | _d();
48 | d.apply(this, arguments);
49 | };
50 | })()
--------------------------------------------------------------------------------
/_test/import.js:
--------------------------------------------------------------------------------
1 |
2 | ///import editor;
3 |
4 | ///import core/browser;
5 | ///import core/utils;
6 | ///import core/EventBase;
7 | ///import core/dtd;
8 | ///import core/domUtils;
9 | ///import core/Range;
10 | ///import core/Selection;
11 | ///import core/Editor;
12 | ///import core/filterword;
13 | ///import core/node;
14 | ///import core/htmlparser;
15 | ///import core/filternode;
16 |
17 |
18 | ///import plugins/removeformat;
19 | ///import plugins/font;
20 | ///import plugins/justify;
21 | ///import plugins/inserthtml;
22 | ///import plugins/link;
23 | ///import plugins/horizontal;
24 | ///import plugins/image;
25 | ///import plugins/selectall;
26 | ///import plugins/paragraph;
27 | ///import plugins/cleardoc;
28 | ///import plugins/preview;
29 | ///import plugins/print;
30 | ///import plugins/basestyle;
31 | ///import plugins/undo;
32 | ///import plugins/paste;
33 | ///import plugins/source;
34 | ///import plugins/enterkey;
35 | ///import plugins/keystrokes;
36 | ///import plugins/list;
37 | ///import plugins/video;
38 | ///import plugins/dropfile;
39 | ///import plugins/autosave;
40 | ///import plugins/formula;
41 |
42 | ///import adapter/adapter;
43 | ///import adapter/autofloat;
44 | ///import adapter/autoheight;
45 | ///import adapter/button;
46 | ///import adapter/dialog;
47 | ///import adapter/combobox;
48 | ///import adapter/fullscreen;
49 | ///import adapter/popup;
50 | ///import adapter/imagescale;
51 | ///import adapter/source;
52 |
53 |
54 | ///import ui/widget;
55 | ///import ui/button;
56 | ///import ui/menu;
57 | ///import ui/dropmenu;
58 | ///import ui/splitbutton;
59 | ///import ui/colorsplitbutton;
60 | ///import ui/popup;
61 | ///import ui/scale;
62 | ///import ui/colorpicker;
63 | ///import ui/combobox;
64 | ///import ui/buttoncombobox;
65 | ///import ui/modal;
66 | ///import ui/tooltip;
67 | ///import ui/tab;
68 | ///import ui/separator;
69 | ///import ui/toolbar;
70 |
71 |
--------------------------------------------------------------------------------
/_test/index.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_test/plugins/cleardoc.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by JetBrains PhpStorm.
3 | * User: shenlixia01
4 | * Date: 11-8-15
5 | * Time: 下午3:47
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'plugins.cleardoc' );
9 |
10 | test( '取得焦点后清空后查看range', function () {
11 | var editor = te.obj[0];
12 | editor.setContent( '
- hello1
- 你好
hello1
' );
13 | editor.focus();
14 | var body = editor.body;
15 | editor.execCommand( 'cleardoc' );
16 | ua.manualDeleteFillData( editor.body );
17 | if ( UM.browser.ie ) {
18 | equal( ua.getChildHTML( body ), '
' ); //目前ie清空文档后不放空格占位符
19 | }
20 | else {
21 | equal( ua.getChildHTML( body ), '
', '清空文档' );
22 | }
23 | } );
24 |
25 | test( '编辑器没有焦点,清空', function () {
26 | var editor = te.obj[0];
27 | editor.setContent( '
hello
hello1
' );
28 | var body = editor.body;
29 | editor.execCommand( 'cleardoc' );
30 | ua.manualDeleteFillData( editor.body );
31 | if ( UM.browser.ie ) {
32 | equal( ua.getChildHTML( body ), '
' );
33 | }
34 | else {
35 | equal( ua.getChildHTML( body ), '
', '清空文档' );
36 | }
37 | } );
38 |
39 | test('选中文本,清空',function(){
40 | var editor = te.obj[0];
41 | var range = te.obj[1];
42 | editor.setContent('
hello
hello1
')
43 | range.selectNode(editor.body.firstChild).select();
44 | editor.execCommand('cleardoc');
45 | var br = ua.browser.ie?'':'
';
46 | equal(ua.getChildHTML(editor.body),'
'+br+'
','');
47 | });
48 |
49 | test( '全选后删除', function() {
50 | var editor = te.obj[0];
51 | if ( UM.browser.ie )
52 | editor.setContent( '
dsafds
' );
53 | else
54 | editor.setContent( '
d
' );
55 | setTimeout(function() {
56 | editor.focus();
57 | editor.execCommand( 'selectall' );
58 | editor.execCommand( 'cleardoc' );
59 | ua.manualDeleteFillData(editor.body);
60 | equal( editor.body.childNodes.length, 1, '删除后只剩一个bolock元素' );
61 | equal( editor.body.firstChild.tagName.toLowerCase(), 'p', '删除后只剩一个p' );
62 | if ( !ua.browser.ie )
63 | equal( editor.body.lastChild.innerHTML, '
', '内容被删除了' );
64 | else
65 | equal( editor.body.lastChild.innerHTML, '', '内容被删除了' );
66 | start();
67 | },50);
68 | stop();
69 | } );
--------------------------------------------------------------------------------
/_test/plugins/dropfile.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: dongyancen
4 | * Date: 13-8-19
5 | * Time: 下午3:11
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module("plugins.dropfile");
9 | test( 'dropfile', function () {
10 | var div = document.body.appendChild(document.createElement('div'));
11 | div.id = 'ue';
12 | var editor = UM.getEditor('ue');
13 | editor.ready(function () {
14 | var fileList = [
15 | {type: "image/jpeg", size: 42466, name: "cc50ddfcc3cec3fdd59d8becd688d43f8694274d.jpg"}
16 | ]
17 | var originalEvent = {dataTransfer: {files: fileList}};
18 | editor.$body.trigger( {type:"drop",originalEvent: originalEvent});
19 | setTimeout(function () {
20 | UM.clearCache('ue');
21 | te.dom.push(editor.container);
22 | start();
23 | }, 600);
24 | });
25 | stop();
26 | } );
--------------------------------------------------------------------------------
/_test/plugins/enterkey.js:
--------------------------------------------------------------------------------
1 | module( 'plugins.enterkey' );
2 |
3 | ///*不作处理chrome会产生div*/
4 | test( 'chrome删除div', function () {
5 | var editor = te.obj[0];
6 | var range = te.obj[1];
7 | var body = editor.body;
8 | if(ua.browser.chrome){
9 | editor.body.innerHTML = '
一级标题
';
10 | range.setStart( body.firstChild.firstChild, 4 ).collapse( 1 ).select();
11 | ua.keydown(editor.body,{'keyCode':13});
12 | range.selectNode(body.lastChild).select();
13 | var index = editor.undoManger.index;
14 | var br = ua.browser.ie ? '' : '
';
15 | ua.keyup(editor.body,{'keyCode':13});
16 | equal(editor.undoManger.list.length,2,'保存现场');
17 | setTimeout( function () {
18 | equal( body.childNodes.length, 2, '2个子节点' );
19 | equal(body.lastChild.tagName.toLowerCase(),'p','div转成p');
20 | equal(ua.getChildHTML(body),'
一级标题
','检查内容');
21 | start();
22 | }, 60 );
23 | stop();
24 | }else{
25 | }
26 | } );
27 | test( 'formatBlock', function () {
28 | if(ua.browser.ie) return ;//ie时没有做处理
29 | var editor = te.obj[0];
30 | var range = te.obj[1];
31 | editor.setContent( '
' );
32 | var tds = editor.body.getElementsByTagName('td');
33 | range.setStart(tds[0].firstChild,6).collapse(true).select();
34 | ua.keydown(editor.body,{'keyCode':13});
35 | setTimeout( function () {
36 | ua.keyup(editor.body,{'keyCode':13});
37 | setTimeout( function () {
38 | var td = editor.body.getElementsByTagName('td')[0];
39 | if(!ua.browser.ie){
40 | equal(td.firstChild&&td.firstChild.tagName.toLowerCase(),'p','加上p');
41 | equal(td.firstChild.innerHTML,'hello1','hello1');
42 | }
43 | else
44 | equal(ua.getChildHTML(td),'hello1','try');
45 | start();
46 | }, 60 );
47 | }, 60 );
48 | stop();
49 | } );
50 |
51 | test( '跨td不删', function () {
52 | var editor = te.obj[0];
53 | var range = te.obj[1];
54 | editor.setContent( '
' );
55 | var tds = editor.body.getElementsByTagName('td');
56 | range.setStart(tds[0],0).setEnd(tds[2],1).select();
57 | editor.addListener("keydown", function (type, evt) {
58 | setTimeout( function () {
59 | ok(evt.defaultPrevented||!evt.returnValue, "keydown");
60 | start();
61 | }, 60 );
62 | });
63 | ua.keydown(editor.body,{'keyCode':13});
64 | stop();
65 | } );
--------------------------------------------------------------------------------
/_test/plugins/formula.js:
--------------------------------------------------------------------------------
1 | module("plugins.formula");
2 | /**
3 | * 插入公式
4 | * 更新公式
5 | */
6 | test( '插入公式', function () {
7 | var editor = te.obj[0];
8 | var range = te.obj[1];
9 | var body = editor.body;
10 | editor.setContent( '
' );
11 | range.setStart( body.firstChild, 0 ).collapse( 1 ).select();
12 |
13 | editor.execCommand( 'formula', '\\frac{x}{y}' );
14 |
15 | var $iframe = $('iframe', editor.body);
16 | equal($iframe.length, 1, '正常插入公式');
17 | equal($iframe.hasClass('mathquill-embedded-latex'), true, '公式classname正常');
18 | equal($iframe.attr('data-latex'), "\\frac{x}{y}", '公式latex值设置正确');
19 | equal(editor.getContent(), '
\\frac{x}{y}
', '正常设置内容');
20 | } );
21 |
22 | test( '更新公式', function () {
23 | var editor = te.obj[0];
24 | var range = te.obj[1];
25 | var body = editor.body;
26 | editor.setContent( '
' );
27 | range.setStart( body.firstChild, 0 ).collapse( 1 ).select();
28 |
29 | editor.execCommand( 'formula', '\\frac{x}{y}' );
30 | var $iframe = $('iframe', editor.body);
31 | $iframe.addClass('edui-formula-active');
32 |
33 | setTimeout(function(){
34 | editor.execCommand( 'formula', '\\frac{z1}{z2}' );
35 | equal($iframe.attr('data-latex'), "\\frac{x}{y}\\frac{z1}{z2}", '公式latex值更新正确');
36 | equal($( editor.getContent() ).find('.mathquill-embedded-latex').text(), '\\frac{x}{y}\\frac{z1}{z2}', '正常获取公式latex内容');
37 |
38 | start();
39 | }, 200);
40 | stop();
41 | } );
42 |
--------------------------------------------------------------------------------
/_test/plugins/horizontal.js:
--------------------------------------------------------------------------------
1 | module( "plugins.horizontal" );
2 |
3 | //normal
4 | test( 'trace 3587 3614:horizontal', function() {
5 | if(ua.browser.ie)return;//todo ie下有问题
6 | var editor = te.obj[0];
7 | var d = editor.document;
8 | var range = te.obj[1];
9 | var db = editor.body;
10 |
11 | editor.setContent( '
hello
topbottom
' );
12 | setTimeout(function(){
13 | range.setStart( d.getElementsByTagName( 'i' )[0].firstChild, 0 ).setEnd( db.lastChild.firstChild, 5 ).select();
14 | editor.execCommand( 'horizontal' );
15 | //
hello
m
16 | if(ua.browser.gecko)
17 | equal( ua.getChildHTML( db ), '
hello
m', "horizontal" );
18 | else
19 | equal( ua.getChildHTML( db ), '
hello
m
', "horizontal" );
20 | start();
21 | },50);
22 | stop();
23 | } );
24 |
25 | test( 'horizontal&&collapsed', function() {//ie8下待确定
26 | if(ua.browser.ie)return;//todo ie下有问题
27 | var editor = te.obj[0];
28 | var range = te.obj[1];
29 | var db = editor.body;
30 | editor.setContent( '
topbottom
' );
31 | range.setStart( db.lastChild.firstChild, 0 ).collapse( true ).select();
32 | editor.execCommand( 'horizontal' );
33 | ua.manualDeleteFillData(db);
34 | var spase = ua.browser.chrome?'
':'';
35 | if(ua.browser.ie)
36 | equal( ua.getChildHTML( db ), '
top
'+spase+'
bottom', "边界不在table里" );
37 | else
38 | equal( ua.getChildHTML( db ), '
top
'+spase+'
bottom
', "边界不在table里" );
39 | } );
40 |
--------------------------------------------------------------------------------
/_test/plugins/inserthtml.js:
--------------------------------------------------------------------------------
1 | module( "plugins.inserthtml" );
2 |
3 | test( '闭合方式插入文本', function() {
4 | var editor = te.obj[0];
5 | var range = te.obj[1];
6 | var body = editor.body;
7 | editor.setContent( '
' );
8 | range.setStart( body.firstChild, 0 ).collapse( 1 ).select();
9 | editor.execCommand( 'inserthtml', 'hello2' );
10 | equal( ua.getChildHTML( body ), '
hello2
', '插入文本节点' );
11 | } );
12 |
13 | //刘表中插入img
14 | test( '列表中插入img', function() {
15 | var editor = te.obj[0];
16 | var range = te.obj[1];
17 | editor.setContent('
');
18 | var lis = editor.body.getElementsByTagName('li');
19 | range.setStart( lis[0], 0 ).collapse(true).select();
20 | editor.execCommand( 'insertimage', {src:'http://img.baidu.com/hi/jx2/j_0001.gif', width:50, height:51} );
21 | stop();
22 | setTimeout(function(){
23 | equal(lis.length,1,'列表长度没有变化');
24 | ua.manualDeleteFillData(lis[0]);
25 | if(ua.browser.ie&&ua.browser.ie<11){
26 | equal(lis[0].firstChild.firstChild.tagName.toLowerCase(),'img','列表中插入img');
27 | equal(lis[0].firstChild.firstChild.attributes['src'].nodeValue,'http://img.baidu.com/hi/jx2/j_0001.gif','列表中插入img');
28 | }
29 | else{
30 | equal(lis[0].firstChild.tagName.toLowerCase(),'img','列表中插入img');
31 | equal(lis[0].firstChild.attributes['src'].nodeValue,'http://img.baidu.com/hi/jx2/j_0001.gif','列表中插入img');
32 | }
33 | start();
34 | },50);
35 | });
--------------------------------------------------------------------------------
/_test/plugins/map.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by dongyancen on 14-1-20.
3 | */
4 | /*test('', function () {
5 | stop();
6 | UM.clearCache('testDefault');
7 | $('.edui-body-container')[0].parentNode.removeChild($('.edui-body-container')[0]);
8 | var div = document.body.appendChild(document.createElement('div'));
9 | div.id = 'map';
10 | var editor = UM.getEditor('map');
11 | setTimeout(function () {
12 | var i = editor.$container.find($(".edui-btn-map"));
13 | // i.trigger('click');
14 | editor.$container.find($('.edui-map-dynamic')).eq(1).attr("checked","checked");
15 | var dialog = editor.$container.find($('.edui-dialog-map'))
16 | // edui-dialog-map
17 | // dialog.find($('.edui-btn-primary')).eq(1).attr("checked","checked");
18 | dialog.find($('.edui-btn-primary')).trigger('click');
19 | //edui-btn-primary
20 | }, 200)
21 |
22 | });*/
23 |
24 |
25 | test('trace:3878:地图dialog显示',function(){
26 | var editor = te.obj[0];
27 | var body = editor.body;
28 | var range = te.obj[1];
29 | editor.setContent("
123
");
30 | var text = body.firstChild.firstChild;
31 | range.setStart(text,'0').collapse(true).select();
32 | var div = document.body.appendChild(document.createElement('div'));
33 | div.id = 'xe';
34 | var editor2 = UM.getEditor('xe');
35 | editor2.ready(function(){
36 | var range2 = new UM.dom.Range(editor2.document,editor2.body);
37 | var body2 = editor2.body;
38 | editor2.setContent( '
123
' );
39 | range2.selectNode( body2.firstChild ).select();
40 | setTimeout(function () {
41 | var i = editor2.$container.find($(".edui-btn-map"));
42 | i.trigger('click');
43 | var map_body = String($('.edui-map-city')[0].value);
44 | i.trigger('click');
45 | equal(map_body,'北京','地图dialog正常显示');
46 | $(div).remove();
47 | start();
48 | }, 200);
49 | });
50 | stop();
51 | });
--------------------------------------------------------------------------------
/_test/plugins/paragraph.js:
--------------------------------------------------------------------------------
1 | module( "plugins.paragraph" );
2 | /**
3 | * h1和p之间的转换
4 | * 表格中添加p和h1
5 | * 列表里加h1
6 | * 传入2个参数,style和attrs
7 | */
8 |
9 | test( 'trace:3595:不闭合h1和p之间的转换', function() {
10 | var editor = te.obj[0];
11 | var range = te.obj[1];
12 | var body = editor.body;
13 | editor.setContent('
hello
');
14 | setTimeout(function () {
15 | range.selectNode(body.firstChild.firstChild).select();
16 | /*p===>h1*/
17 | var block = ua.browser.ie ? '标题 1' : 'h1';
18 | editor.execCommand('paragraph', 'h1');
19 | equal(ua.getChildHTML(body), '
hello
');
20 | equal(editor.queryCommandValue('paragraph'), block, '当前的block元素为h1');
21 | /*h1===>p*/
22 | range.selectNode(body.firstChild.firstChild).select();
23 | editor.execCommand('paragraph', 'p');
24 | equal(ua.getChildHTML(body), '
hello
');
25 | /*多个段落的部分文本*/
26 | var block = ua.browser.ie ? '标题 3' : 'h3';
27 | editor.setContent('
hello
hello2
');
28 | setTimeout(function () {
29 | range.setStart(body.firstChild.firstChild, 2).setEnd(body.lastChild.firstChild, 1).select();
30 | editor.execCommand('paragraph', 'h3');
31 | if (ua.browser.webkit)
32 | equal(ua.getChildHTML(body), '
hello
hello2
');
33 | else
34 | equal(ua.getChildHTML(body), '
hello
hello2
');
35 | range.setStart(body.firstChild.firstChild, 2).collapse(true).select();
36 | equal(editor.queryCommandValue('paragraph'), block, '当前的block元素为h3');
37 | start();
38 | }, 50);
39 | }, 50);
40 | stop();
41 | } );
42 |
43 | test( '闭合h1和p之间的转换', function() {
44 | var editor = te.obj[0];
45 | var range = te.obj[1];
46 | var body = editor.body;
47 | editor.setContent( '
hello
hello2
' );
48 | setTimeout(function(){
49 | range.setStart( body.firstChild.firstChild, 1 ).collapse( 1 ).select();
50 | /*p===>h1*/
51 | editor.execCommand( 'paragraph', 'h1' );
52 | equal( ua.getChildHTML( body ), '
hello
hello2
' );
53 | /*h1===>p*/
54 | var block = ua.browser.ie?'普通':'p';
55 | range.setStart( body.firstChild.firstChild, 1 ).collapse( 1 ).select();
56 | editor.execCommand( 'paragraph', 'p' );
57 | equal( ua.getChildHTML( body ), '
hello
hello2
' );
58 | range.setStart(body.lastChild.firstChild,0).collapse(1).select();
59 | equal( editor.queryCommandValue( 'paragraph' ), block, '当前的block元素为p' );
60 | start();
61 | },50);
62 |
63 | stop();
64 | } );
65 |
66 |
--------------------------------------------------------------------------------
/_test/plugins/paste.js:
--------------------------------------------------------------------------------
1 | module( 'plugins.paste' );
2 |
3 | //不能模拟出真实的粘贴效果,此用例用于检查中间值
4 | test( '粘贴', function() {
5 | if(ua.browser.ie || ua.browser.opera)return;
6 | var div = document.body.appendChild( document.createElement( 'div' ) );
7 | $( div ).css( 'width', '500px' ).css( 'height', '500px' ).css( 'border', '1px solid #ccc' );
8 | var me = te.obj[2];
9 | me.render(div);
10 | stop();
11 | me.ready(function(){
12 | var range = new UM.dom.Range( te.obj[2].document ,te.obj[2].body);
13 | me.focus();
14 | me.setContent('
hello
');
15 | range.setStart(me.body.firstChild,0).collapse(true).select();
16 | ua.keydown(me.body,{'keyCode':65,'ctrlKey':true});
17 | ua.keydown(me.body,{'keyCode':67,'ctrlKey':true});
18 | setTimeout(function(){
19 | me.focus();
20 | range.setStart(me.body.firstChild,0).collapse(true).select();
21 | ua.paste(me.body,{'keyCode':86,'ctrlKey':true});
22 | equal(me.body.lastChild.id,'baidu_pastebin','检查id');
23 | equal(me.body.lastChild.style.position,'absolute','检查style');
24 | div.parentNode.removeChild(div);
25 | start();
26 | },50);
27 | stop();
28 | });
29 | } );
30 |
--------------------------------------------------------------------------------
/_test/plugins/tools.js:
--------------------------------------------------------------------------------
1 | /**
2 |
3 | */
4 | (function () {
5 | function mySetup() {
6 | for (var config in window.UMDITOR_CONFIG) {
7 | if (typeof(window.UMDITOR_CONFIG[config]) == 'string')
8 | window.UMDITOR_CONFIG[config] = window.UMDITOR_CONFIG[config].replace('_test/tools/br/', '');
9 | }
10 | var div = document.body.appendChild(document.createElement('div'));
11 | $(div).css('width', '500px').css('height', '500px').css('border', '1px solid #ccc');
12 | var editor = new UM.Editor({'initialContent':'
欢迎使用umeditor
', 'autoFloatEnabled':false,webAppKey:'Qr0M9yTEoLIiUSXXQTtq7yFt'});
13 | div.id = "testDefault";
14 | var ue = new UM.Editor({'UEDITOR_HOME_URL':'../../../', 'autoFloatEnabled':true,webAppKey:'Qr0M9yTEoLIiUSXXQTtq7yFt'});
15 | QUnit.readyFlag =0;
16 | editor.render(div);
17 | stop();
18 | setTimeout(function(){
19 | editor.ready(function () {
20 | var range = new UM.dom.Range(editor.document,editor.body);
21 | te.dom.push(div);
22 | te.obj.push(editor);
23 | te.obj.push(range);
24 | te.obj.push(ue);
25 | QUnit.readyFlag =1;
26 | });
27 | },50);
28 | document.getElementsByClassName = function (eleClassName) {
29 | var getEleClass = [];//定义一个数组
30 | var myclass = new RegExp("\\b" + eleClassName + "\\b");//创建一个正则表达式对像
31 | var elem = this.getElementsByTagName("*");//获取文档里所有的元素
32 | for (var h = 0; h < elem.length; h++) {
33 | var classes = elem[h].className;//获取class对像
34 | if (myclass.test(classes)) getEleClass.push(elem[h]);//正则比较,取到想要的CLASS对像
35 | }
36 | return getEleClass;//返回数组
37 | }
38 | }
39 |
40 | var _d = function () {
41 | if (te) {
42 | if (te.dom && te.dom.length) {
43 | for (var i = 0; i < te.dom.length; i++) {
44 | if (te.dom[i] && te.dom[i].parentNode)
45 | te.dom[i].parentNode.removeChild(te.dom[i]);
46 | }
47 |
48 | }
49 | }
50 | te.dom = [];
51 | te.obj = [];
52 | }
53 | var s = QUnit.testStart, d = QUnit.testDone;
54 | QUnit.testStart = function () {
55 | s.apply(this, arguments);
56 | mySetup();
57 | };
58 | QUnit.testDone = function () {
59 | _d();
60 | d.apply(this, arguments);
61 | }
62 | })();
--------------------------------------------------------------------------------
/_test/plugins/video.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Administrator
4 | * Date: 13-5-15
5 | * Time: 下午7:15
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'plugins.video' );
9 |
10 | test( '视频', function () {
11 | var editor = te.obj[0];
12 | var range = te.obj[1];
13 | editor.setContent( '
hello
' );
14 | range.setStart(editor.body.firstChild,0).collapse(true).select();
15 | var videoObject ={url: "http://player.youku.com/player.php/Type/Folder/Fid/19275705/Ob/1/sid/XNTU3Mjk4NzQ4/v.swf", width: "500", height: "400", align: "right"};
16 | editor.execCommand( 'insertvideo',videoObject);
17 | stop();
18 | setTimeout(function(){
19 | var img = editor.body.getElementsByTagName('img');
20 | equal(img.length,1,'插入img');
21 | equal(img[0].width,"500");
22 | equal(img[0].height,"400");
23 | equal(img[0].src,editor.options.UMEDITOR_HOME_URL+'themes/default/images/spacer.gif');
24 | equal(ua.getFloatStyle(img[0]),'right');//trace 3653
25 | if(ua.browser.gecko||ua.browser.ie>8){
26 | ok(img[0].style.background.indexOf('url(\"'+editor.options.UMEDITOR_HOME_URL+'themes/default/images/videologo.gif\")') > -1);
27 | }
28 | else
29 | {
30 | ok(img[0].style.background.indexOf("url("+editor.options.UMEDITOR_HOME_URL+"themes/default/images/videologo.gif)") > -1);
31 | }
32 | start();
33 | },100);
34 | } );
--------------------------------------------------------------------------------
/_test/testDesign/Manual regression cases.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/Manual regression cases.xmind
--------------------------------------------------------------------------------
/_test/testDesign/UeditorMini_1.0.0_测试报告.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/UeditorMini_1.0.0_测试报告.docx
--------------------------------------------------------------------------------
/_test/testDesign/UeditorMini_1.0.0_测试计划.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/UeditorMini_1.0.0_测试计划.docx
--------------------------------------------------------------------------------
/_test/testDesign/config.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/config.xmind
--------------------------------------------------------------------------------
/_test/testDesign/core.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/core.xmind
--------------------------------------------------------------------------------
/_test/testDesign/domUtils.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/domUtils.xmind
--------------------------------------------------------------------------------
/_test/testDesign/image revelant.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/image revelant.xmind
--------------------------------------------------------------------------------
/_test/testDesign/pluginsAutoCaseListBase.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/pluginsAutoCaseListBase.docx
--------------------------------------------------------------------------------
/_test/testDesign/regression testing.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/regression testing.xmind
--------------------------------------------------------------------------------
/_test/testDesign/test list for 1.2.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/testDesign/test list for 1.2.xmind
--------------------------------------------------------------------------------
/_test/tools/br/batchrun.sh:
--------------------------------------------------------------------------------
1 | /home/work/.bash_profile
2 | cd /home/work/repos/Tangram-base
3 | /home/work/soft/git-1.7.3.5/bin-wrappers/git pull
4 | sh release/output.sh
5 | rm -rf test/tools/br/report
6 | wget -q -O /tmp/tmp.php http://10.32.34.115:8000/Tangram-base/test/tools/br/runall.php?clearreport=true&cov=true
7 | sleep 3m
8 | rm -rf test/tools/br/report
9 | wget -q -O /tmp/tmp.php http://10.32.34.115:8000/Tangram-base/test/tools/br/runall.php?release=true&clearreport=true
10 | cd -
--------------------------------------------------------------------------------
/_test/tools/br/coverage/jscov.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_test/tools/br/coverage/jscoverage-highlight.css:
--------------------------------------------------------------------------------
1 | /*
2 | jscoverage-highlight.css - JSCoverage syntax highlighting style sheet
3 | Copyright (C) 2008, 2009, 2010 siliconforks.com
4 |
5 | This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License along
16 | with this program; if not, write to the Free Software Foundation, Inc.,
17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | */
19 |
20 | /* keyword, type, symbol, cbracket */
21 | #sourceTable .k {
22 | font-weight: bold;
23 | }
24 |
25 | /* string, regexp, number */
26 | #sourceTable .s {
27 | color: #006400;
28 | }
29 |
30 | /* specialchar */
31 | #sourceTable .t {
32 | color: #2e8b57;
33 | }
34 |
35 | /* comment */
36 | #sourceTable .c {
37 | font-style: italic;
38 | }
39 |
--------------------------------------------------------------------------------
/_test/tools/br/coverage/jscoverage-ie.css:
--------------------------------------------------------------------------------
1 | /*
2 | jscoverage-ie.css - JSCoverage style sheet for Internet Explorer
3 | Copyright (C) 2007, 2008, 2009, 2010 siliconforks.com
4 |
5 | This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License along
16 | with this program; if not, write to the Free Software Foundation, Inc.,
17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | */
19 |
20 | #headingDiv {
21 | position: static;
22 | margin-left: 10px;
23 | margin-right: 10px;
24 | padding-top: 0.5em;
25 | }
26 |
27 | #tabs {
28 | clear: all;
29 | position: static;
30 | top: auto;
31 | left: auto;
32 | right: auto;
33 | height: auto;
34 | margin-left: 10px;
35 | margin-right: 10px;
36 | }
37 |
38 | #tabs div {
39 | position: relative;
40 | height: auto;
41 | line-height: normal;
42 | padding-top: 5px;
43 | padding-bottom: 5px;
44 | }
45 |
46 | #tabs div.selected {
47 | padding-bottom: 6px;
48 | z-index: 2;
49 | }
50 |
51 | .TabPage {
52 | position: relative;
53 | top: -1px;
54 | left: auto;
55 | right: auto;
56 | bottom: auto;
57 | clear: left;
58 | margin-left: 10px;
59 | margin-right: 10px;
60 | padding: 10px;
61 | z-index: 1;
62 | }
63 |
64 | #locationDiv {
65 | margin-bottom: 10px;
66 | }
67 |
68 | #iframeDiv {
69 | position: static;
70 | width: 100%;
71 | }
72 |
73 | #summaryDiv {
74 | position: static;
75 | width: 100%;
76 | }
77 |
78 | #fileDiv {
79 | margin-bottom: 10px;
80 | }
81 |
82 | #sourceDiv {
83 | position: static;
84 | width: 100%;
85 | }
86 |
87 | #storeDiv {
88 | position: static;
89 | width: 100%;
90 | }
91 |
92 | /* some defaults */
93 |
94 | .TabPage {
95 | height: 650px;
96 | }
97 |
98 | #iframeDiv {
99 | height: 600px;
100 | }
101 |
102 | #summaryDiv {
103 | height: 600px;
104 | }
105 |
106 | #sourceDiv {
107 | height: 600px;
108 | }
109 |
--------------------------------------------------------------------------------
/_test/tools/br/coverage/jscoverage-throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/br/coverage/jscoverage-throbber.gif
--------------------------------------------------------------------------------
/_test/tools/br/css/bg_button_a.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/br/css/bg_button_a.gif
--------------------------------------------------------------------------------
/_test/tools/br/css/bg_button_span.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/br/css/bg_button_span.gif
--------------------------------------------------------------------------------
/_test/tools/br/filehelper.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_test/tools/br/geneHistory.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_test/tools/br/geneXML.php:
--------------------------------------------------------------------------------
1 | testsuite as $testsuite){
13 | foreach ($testsuite->testcase as $testResult) {
14 | // $totalCov = 0;
15 | $browser = $testResult['browserInfo'];
16 | $host = $testResult['hostInfo'];
17 | $caseName = $testResult['name']; //得到用例名称
18 | settype($caseName, "string"); //$caseName本来类型为object,需要做转换
19 | $fail = $testResult['failNumber'];
20 | $total = $testResult['totalNumber'];
21 | $cov = $testResult['cov'];
22 | settype($browser, "string");
23 | settype($host, "string");
24 | settype($fail, "string");
25 | settype($total, "string");
26 | settype($cov, "float");
27 |
28 | if (!array_key_exists($caseName, $caseList)) { //如果这个用例不存在
29 | $caseInfo = array (
30 | 'hostInfo' => $host,
31 | 'fail' => $fail,
32 | 'total' => $total,
33 | 'cov' => $cov
34 | );
35 | // $totalCov += $cov;
36 | $caseList[$caseName] = array (
37 | $browser => $caseInfo//,
38 | // 'totalCov'=>$totalCov
39 | );
40 |
41 | // $caseList['totalCov'] = $totalCov;
42 | } else { //否则添加到相应的用例中去
43 | $foundCase = $caseList[$caseName]; //找到用例名称对应的array,$caseName为key
44 | if (!array_key_exists($browser, $foundCase)) { //如果没有该浏览器信息,则添加
45 | // $totalCov += $cov;
46 | $caseList[$caseName][$browser] = array (
47 | 'hostInfo' => $host,
48 | 'fail' => $fail,
49 | 'total' => $total,
50 | 'cov' => $cov
51 | );
52 | // $caseList[$caseName]['totalCov'] = $totalCov;
53 | } else {
54 | $foundBrowser = $foundCase[$browser]; //有这个浏览器
55 | array_push($foundBrowser, array (
56 | 'hostInfo' => $host,
57 | 'fail' => $fail,
58 | 'total' => $total,
59 | 'cov' => $cov
60 | ));
61 | }
62 | }
63 |
64 | }
65 | }
66 |
67 | //根据需求添加仅记录失败情况的接口
68 | if($onlyfails){//如果仅考虑失败情况,此处根据用例情况过滤
69 | foreach($caseList as $name => $info){
70 | $all_success = true;//记录当前用例是否全部运行成功
71 | foreach($info as $b => $result){
72 | if($result['fail'] > 0)
73 | $all_success = false;//如果有失败情况则终止循环并进入下一个用例分析
74 | break;
75 | }
76 | //if($all_success) //如果全部通过则从记录中移除
77 | //unset($caseList[$name]);
78 | }
79 | }
80 | return $caseList;
81 | }
82 | ?>
--------------------------------------------------------------------------------
/_test/tools/br/import.php:
--------------------------------------------------------------------------------
1 | $d){
53 | // if(preg_match("/editorui/",$dd)){
54 | // echo "*************".file_get_contents($d.$path)."************";
55 | // }
56 | if(file_exists($d.$path)){
57 | $source.= file_get_contents($d.$path);
58 | $source.="\n";//读取文件内容必须加个回车
59 | break;
60 | }
61 | }
62 | }
63 | }
64 | return $source;
65 | }
66 | //update by bell 2011-03-25, 更新覆盖率相关逻辑
67 | echo importSrc($cov);
68 | ?>
--------------------------------------------------------------------------------
/_test/tools/br/js/UserAction manual.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/br/js/UserAction manual.rar
--------------------------------------------------------------------------------
/_test/tools/br/js/ext_qunit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 重载QUnit部分接口实现批量执行控制功能
3 | */
4 | (function() {
5 | if (!QUnit)
6 | return;
7 | var ms = QUnit.moduleStart, d = QUnit.done;
8 |
9 | function _d(args /* failures, total */) {
10 | //默认展开失败用例
11 | $('li.fail ol').toggle();
12 | if (parent && parent.brtest) {
13 | parent.$(parent.brtest).trigger('done', [ new Date().getTime(), {
14 | failed : args[0],
15 | passed : args[1],
16 | detail:args[2]
17 | }, window._$jscoverage || null ]);
18 | }
19 | }
20 | QUnit.moduleStart = function() {
21 | stop();
22 | /* 为批量执行等待import.php正确返回 */
23 | var h = setInterval(function() {
24 | if (window && window['UM']) {
25 | clearInterval(h);
26 | ms.apply(this, arguments);
27 | start();
28 | }
29 | }, 20);
30 | };
31 | QUnit.done = function() {
32 | _d(arguments);
33 | d.apply(this, arguments);
34 | };
35 | })();
36 |
--------------------------------------------------------------------------------
/_test/tools/br/lib/Staf.php:
--------------------------------------------------------------------------------
1 | ]] COMMAND
[PARMS ]
19 | * @param $path
20 | * @param $params
21 | * @param $host
22 | */
23 | public static function process_start($path, $params, $host='local', $wait=false){
24 | $cmd = "start shell command \\\"\"$path\"\\\" parms \\\"\"$params\"\\\"";
25 | if($wait){
26 | $cmd.=" wait returnstdout returnstderr";
27 | }
28 | return self::process($cmd, $host);
29 | }
30 |
31 | /**
32 | * STOP | HANDLE > [USING ]
33 | * @param unknown_type $handle
34 | * @param unknown_type $host
35 | */
36 | public static function process_stop($handle, $host='local', $all=0){
37 | $cmd = $all ? "STOP ALL CONFIRM":"STOP HANDLE $handle";
38 | return self::process($cmd, $host);
39 | }
40 |
41 | public static function queryHandle($browser){
42 | $filename = "temp\\$browser";
43 | if(file_exists($filename)){
44 | $handle = file_get_contents($filename);
45 | delete($filename);
46 | return $handle;
47 | }
48 | return false;
49 | }
50 |
51 | public static function saveHandle($browser){
52 | $filename = "temp\\$browser";
53 | $fp = fopen($filename, 'w');
54 | fwrite($fp, 'test');
55 | fclose($fp);
56 | }
57 | }
58 | ?>
--------------------------------------------------------------------------------
/_test/tools/br/lib/StafResult.php:
--------------------------------------------------------------------------------
1 | rc = $rc;
9 | $this->info = $info;
10 | }
11 |
12 | public function __toString()
13 | {
14 | return "return code : ".$rc.", return info : ".$info."\n";
15 | }
16 |
17 | public static function parse($result){
18 | return new StafResult(0, $result);
19 | }
20 | }?>
--------------------------------------------------------------------------------
/_test/tools/br/log.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_test/tools/br/read.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_test/tools/br/run.php:
--------------------------------------------------------------------------------
1 | ';
6 | }
7 | ;
8 | require_once "case.class.php";
9 | $c = new Kiss( '../../../' , $_GET[ 'case' ] );
10 | $title = $c->name;
11 | $cov = array_key_exists( 'cov' , $_GET );
12 | ?>
13 |
14 |
15 |
16 |
17 | print_js( $cov ); ?>
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
40 |
45 |
46 |
--------------------------------------------------------------------------------
/_test/tools/br/runC.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/br/runC.php
--------------------------------------------------------------------------------
/_test/tools/br/txt/test1_2.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 欢迎使用umeditor!
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 欢迎使用umeditor!
15 |
16 |
17 |
18 |
19 | 欢迎使用umeditor!
20 |
21 |
22 |
23 |
24 | 欢迎使用umeditor!
25 |
26 |
27 |
28 |
29 | 欢迎使用umeditor!
30 |
31 |
32 |
33 |
34 | 欢迎使用umeditor!
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/_test/tools/br/txt/test2_2.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | 欢迎使用umeditor!
4 |
5 |
6 |
7 |
8 | 欢迎使用umeditor!
9 |
10 |
11 |
12 |
13 | 欢迎使用umeditor!
14 |
15 |
16 |
17 |
18 | 欢迎使用umeditor!
19 |
20 |
21 |
22 |
23 | 欢迎使用umeditor!
24 |
25 |
26 |
27 |
28 | 欢迎使用umeditor!
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/_test/tools/coverage/cov.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | jscoverage.exe --encoding=UTF-8 ../../../_src ../../coverage
--------------------------------------------------------------------------------
/_test/tools/coverage/jscoverage.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/coverage/jscoverage.exe
--------------------------------------------------------------------------------
/_test/tools/data/frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/_test/tools/data/frame.php:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | ";
10 | else
11 | print "";
12 | ?>
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/_test/tools/data/test.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/data/test.JPG
--------------------------------------------------------------------------------
/_test/tools/data/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_test/tools/data/testReady.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/_test/tools/lib/ant_tangram_ext.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/ant_tangram_ext.jar
--------------------------------------------------------------------------------
/_test/tools/lib/js.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/js.jar
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/conf/custcheck.conf:
--------------------------------------------------------------------------------
1 | [command]
2 |
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/conf/ignore.list:
--------------------------------------------------------------------------------
1 | #there 3 level:ignore warning error
2 | [level]
3 | Unsafe character=ignore
4 | Mixed spaces and tabs=warning
5 | Too many var statements=ignore
6 | Unclosed string=ignore
7 | Missing semicolon=error
8 | Unexpected dangling=ignore
9 | to compare with=ignore
10 | is not defined=ignore
11 | Unexpected dangling=ignore
12 | A constructor name should start with an uppercase letter=warning
13 | Expected an assignment or function call and instead saw an expression=warning
14 | Mixed spaces and tabs=ignore
15 |
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/conf/omitfiles.conf:
--------------------------------------------------------------------------------
1 | #[config format]:REGULAR:true|false,true means set filtering enabeld and false means not
2 | #notice:REGULAR will be set in the command "find /top/dir -name REGULAR"
3 | [omitfils]
4 | *data*:true
5 |
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/core/customcheck/cust.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo $1'***222***444***555***666'
4 |
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/core/jshint/js.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/core/jshint/js.jar
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/core/jshint/jshint-rhino.js:
--------------------------------------------------------------------------------
1 | /*jshint boss: true, rhino: true */
2 | /*globals JSHINT*/
3 |
4 |
5 |
6 | (function (args) {
7 | var filenames = [],
8 | optstr, // arg1=val1,arg2=val2,...
9 | predef, // global1=override,global2,global3,...
10 | opts = { rhino: true },
11 | retval = 0;
12 | load(args[0]+"jshint.js");
13 |
14 | for(var i=1;i -1) {
18 | //first time it's the options
19 | if (!optstr) {
20 | optstr = args[i];
21 | } else if (!predef) {
22 | predef = args[i];
23 | }
24 | } else {
25 | filenames.push(args[i]);
26 |
27 | }
28 | }
29 |
30 | if (filenames.length === 0) {
31 | print('Usage: jshint.js file.js');
32 | quit(1);
33 | }
34 |
35 | if (optstr) {
36 | optstr.split(',').forEach(function (arg) {
37 | var o = arg.split('=');
38 | opts[o[0]] = (function (ov) {
39 | switch (ov) {
40 | case 'true':
41 | return true;
42 | case 'false':
43 | return false;
44 | default:
45 | return ov;
46 | }
47 | }(o[1]));
48 | });
49 | }
50 |
51 | if (predef) {
52 | opts.predef = {};
53 | predef.split(',').forEach(function (arg) {
54 | var global = arg.split('=');
55 | opts.predef[global[0]] = (function (override) {
56 | return (override === 'false') ? false : true;
57 | }(global[1]));
58 | });
59 | }
60 |
61 | filenames.forEach(function (name) {
62 |
63 | var input = readFile(name);
64 |
65 | if (!input) {
66 | print('jshint: Couldn\'t open file ' + name);
67 | quit(1);
68 | }
69 |
70 | if (!JSHINT(input, opts)) {
71 | for (var i = 0, err; err = JSHINT.errors[i]; i += 1) {
72 | print(name+"***"+err.reason+"***"+err.line+"***"+err.character+"***"+err.evidence);
73 | //print(err.reason + ' (' + name + ':' + err.line + ':' + err.character + ')');
74 | //print('> ' + (err.evidence || '').replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
75 | //print('');
76 | //print("===========");
77 | //print(err.evidence);
78 | //print(err.raw);
79 | //print(err.a);
80 | //print("===========");
81 | //var myReport = JSHINT.report(false);
82 | //print(myReport);
83 | }
84 | retval = 1;
85 | }
86 | });
87 |
88 | quit(retval);
89 | }(arguments));
90 |
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/core/tpl/htmlpart.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | | ID |
8 | LEVEL |
9 | DESCRIPTION |
10 | LINE NO |
11 | CONTENT |
12 |
13 | [---to be replaced 2---]
14 |
15 |
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/editor.js:
--------------------------------------------------------------------------------
1 | UMDITOR_CONFIG = window.UMDITOR_CONFIG || {};
2 |
3 | var baidu = window.baidu || {};
4 |
5 | window.baidu = baidu;
6 |
7 | window.UM = UM = {};
8 |
9 | UM.plugins = {};
10 |
11 | UM.commands = {};
12 |
13 | UM.instants = {};
14 |
15 | UM.I18N = {};
16 |
17 | console.log("console");
18 | alert("alert");
19 |
20 | UM.version = "1.2.3.0";
21 |
22 | var dom = UM.dom = {};
--------------------------------------------------------------------------------
/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/version:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/version
--------------------------------------------------------------------------------
/_test/tools/lib/jslint4java-2.0.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/jslint4java-2.0.2.jar
--------------------------------------------------------------------------------
/_test/tools/lib/jslint4java-ant-1.4.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/jslint4java-ant-1.4.2.jar
--------------------------------------------------------------------------------
/_test/tools/lib/npPlugintest.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/tools/lib/npPlugintest.dll
--------------------------------------------------------------------------------
/_test/ui/colorpicker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: xuheng
4 | * Date: 13-8-20
5 | * Time: 下午7:02
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'ui.colorpicker' );
9 |
10 | test( 'colorpicker--初始化', function() {
11 | var div = document.body.appendChild( document.createElement( 'div' ) );
12 | $(div).attr('id','test');
13 |
14 | $colorPickerWidget = $.eduicolorpicker({
15 | lang_clearColor:'清除',
16 | lang_themeColor: '主题',
17 | lang_standardColor: '标准'
18 | }).appendTo(div);
19 |
20 | var $btn=$.eduibutton({
21 | icon : "bold",
22 | title: "测试"
23 | }).appendTo(div);
24 |
25 | stop();
26 | setTimeout(function(){
27 | $colorPickerWidget.edui().show($btn);
28 |
29 | var isshow=$colorPickerWidget.css("display")!="none";
30 | equal(isshow,true,'检查菜单是否显示');
31 |
32 | $colorPickerWidget.edui().hide();
33 | var ishide=$colorPickerWidget.css("display")=="none";
34 | equal(ishide,true,'检查菜单是否隐藏');
35 |
36 | var ele=$colorPickerWidget.find("table .edui-colorpicker-colorcell")[0];
37 | var color=$(ele).data('color');
38 |
39 | $colorPickerWidget.on('pickcolor',function(evt,value){
40 | equal(value,color,'检查菜单点击颜色是否正确');
41 |
42 | div.parentNode.removeChild(div);
43 | start();
44 | });
45 |
46 | ua.click(ele);
47 |
48 | });
49 | } );
--------------------------------------------------------------------------------
/_test/ui/dropmenu.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午1:28
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module('ui.dropmenu');
9 |
10 | test('dropmenu--初始化', function () {
11 | UM.delEditor('testeditor');
12 | document.getElementById('testeditor')&&document.getElementById('testeditor').parentNode.removeChild(document.getElementById('testeditor'));
13 |
14 | var div = document.body.appendChild(document.createElement('div'));
15 | $(div).attr('id', 'test');
16 |
17 | var item, value,
18 | $dropMenuWidget = $.eduidropmenu({data:[
19 | {"value":"decimal","label":"1,2,3..."},
20 | {"value":"lower-alpha","label":"a,b,c..."},
21 | {"value":"lower-roman","label":"i,ii,iii..."},
22 | {"value":"upper-alpha","label":"A,B,C..."},
23 | {"value":"upper-roman","label":"I,II,III..."}
24 | ],click:function(evt, val){
25 | equal(value, val, '检查菜单点击的value是否正确');
26 | div.parentNode.removeChild(div);
27 |
28 | $dropMenuWidget.edui().val('upper-alpha');
29 | equal($dropMenuWidget.edui().val(), 'upper-alpha', '检查设置菜单值是否正常');
30 |
31 | $dropMenuWidget.edui().disabled(true);
32 | equal($dropMenuWidget.find("li").hasClass('edui-disabled'), true, '检查选项失效后,菜单项是否有disabled的class');
33 |
34 | $dropMenuWidget.edui().disabled(false);
35 | equal($dropMenuWidget.find("li").hasClass('edui-disabled'), false, '检查选项失效后,菜单项是否没有disabled的class');
36 | var $subMenuWidget = $.eduidropmenu({data:[
37 | {"value":"decimal","label":"1,2,3..."},
38 | {"value":"lower-alpha","label":"a,b,c..."},
39 | {"value":"lower-roman","label":"i,ii,iii..."},
40 | {"value":"upper-alpha","label":"A,B,C..."},
41 | {"value":"upper-roman","label":"I,II,III..."}
42 | ]});
43 | $dropMenuWidget.edui().addSubmenu('subMenu', $subMenuWidget, 5);
44 | equal($dropMenuWidget.find(".edui-dropdown-menu").length!=0, true, '检查是否已插入子节点');
45 | $(div).remove();
46 | start();
47 | }}).appendTo(div);
48 |
49 | var $btn = $.eduibutton({
50 | icon: "paragraph",
51 | title: "测试"
52 | }).appendTo(div);
53 |
54 | $dropMenuWidget.edui().show($btn);
55 | $item = $dropMenuWidget.find("li").eq(0);
56 | value = $item.data('value');
57 |
58 |
59 | $item.trigger('click');
60 |
61 | stop();
62 | });
--------------------------------------------------------------------------------
/_test/ui/menu.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午5:17
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module('ui.menu');
9 |
10 | test('menu--初始化', function () {
11 | var div = document.body.appendChild(document.createElement('div'));
12 | $(div).attr('id', 'test');
13 |
14 | var $dropMenuWidget = $.eduidropmenu({data:[
15 | {"value":"decimal","label":"1,2,3..."},
16 | {"value":"lower-alpha","label":"a,b,c..."},
17 | {"value":"lower-roman","label":"i,ii,iii..."},
18 | {"value":"upper-alpha","label":"A,B,C..."},
19 | {"value":"upper-roman","label":"I,II,III..."}
20 | ]}).appendTo(div);
21 |
22 | var $btn = $.eduibutton({
23 | icon: "paragraph",
24 | title: "测试"
25 | }).appendTo(div);
26 |
27 | equal($btn.data('$mergeObj')==undefined, true, 'attachTo方法执行之前,按钮没有data("$mergeObj")');
28 | $dropMenuWidget.edui().attachTo($btn);
29 | equal($btn.data('$mergeObj')!=undefined, true, 'attachTo方法执行之后,按钮有data("$mergeObj")');
30 |
31 | var $subMenuWidget = $.eduidropmenu({data:[
32 | {"value":"decimal","label":"1,2,3..."},
33 | {"value":"lower-alpha","label":"a,b,c..."},
34 | {"value":"lower-roman","label":"i,ii,iii..."},
35 | {"value":"upper-alpha","label":"A,B,C..."},
36 | {"value":"upper-roman","label":"I,II,III..."}
37 | ]});
38 | //插入子菜单
39 | $dropMenuWidget.edui().addSubmenu('subMenu', $subMenuWidget, 5);
40 |
41 | ua.click($btn[0]);
42 |
43 | setTimeout(function(){
44 |
45 | var isshow = $dropMenuWidget.css("display") != "none";
46 | equal(isshow, true, '检查菜单是否显示');
47 |
48 | ua.click($dropMenuWidget.find('li')[0]);
49 | setTimeout(function(){
50 | var ishide = $dropMenuWidget.css("display") == "none";
51 | equal(ishide, true, '检查菜单是否隐藏');
52 |
53 | $(div).remove();
54 | start();
55 | },0);
56 |
57 | },100);
58 | stop();
59 | });
--------------------------------------------------------------------------------
/_test/ui/modal.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: xuheng
4 | * Date: 13-8-1
5 | * Time: 下午3:41
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'ui.modal' );
9 |
10 | test( 'modal--初始化', function() {
11 | var div = document.body.appendChild( document.createElement( 'div' ) );
12 | $(div).attr('id','test');
13 | stop();
14 | setTimeout(function(){
15 | var $dialog=$.eduimodal({
16 | title: "titletest",
17 | width: 300,
18 | height: 400,
19 | oklabel:'oktest',
20 | cancellabel:'canceltest'
21 | }).appendTo(div);
22 |
23 | var title=$('.edui-title',$dialog).text();
24 | equal(title,'titletest','检查dialog标题');
25 |
26 | var oklabel=$('[data-ok="modal"]',$dialog).text();
27 | equal(oklabel,'oktest','检查dialog确定按钮文本');
28 |
29 | var cancellabel=$('.edui-modal-footer [data-hide="modal"]',$dialog).text();
30 | equal(cancellabel,'canceltest','检查dialog取消按钮文本');
31 |
32 | var wt=$dialog.width();
33 | equal(wt,300,'检查dialog宽度');
34 |
35 | var ht=$('.edui-modal-body',$dialog).height();
36 | equal(ht,400,'检查dialog高度');
37 |
38 | div.parentNode.removeChild(div);
39 | start();
40 | });
41 | } );
42 |
43 |
44 | test( 'modal--显示 隐藏', function() {
45 | var div = document.body.appendChild( document.createElement( 'div' ) );
46 | $(div).attr('id','test');
47 | stop();
48 | setTimeout(function(){
49 | var $dialog=$.eduimodal({
50 | width: 300,
51 | height: 400
52 | }).appendTo(div);
53 |
54 | $dialog.edui().toggle();
55 | var isshow=($dialog.css('display')=="none");
56 | equal(isshow,false,'检查dialog是否显示');
57 |
58 | $dialog.edui().toggle();
59 | var ishide=($dialog.css('display')=="none");
60 | equal(ishide,true,'检查dialog是否隐藏');
61 |
62 | div.parentNode.removeChild(div);
63 | start();
64 | });
65 | } );
66 |
--------------------------------------------------------------------------------
/_test/ui/popup.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午5:18
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | /**
9 | * Created by JetBrains PhpStorm.
10 | * User: dongyancen
11 | * Date: 12-4-12
12 | * Time: 下午4:47
13 | * To change this template use File | Settings | File Templates.
14 | */
15 | module( 'ui.popup' );
16 |
17 | test('popup--初始化', function () {
18 | var div = document.body.appendChild(document.createElement('div'));
19 | $(div).attr('id', 'test');
20 |
21 | var $btn = $.eduibutton({
22 | icon: "bold",
23 | title: "测试"
24 | }).appendTo(div);
25 |
26 | var $popupWidget = $.eduipopup({
27 | subtpl: 'popup text',
28 | width: '100',
29 | height: '100'
30 | });
31 |
32 | $popupWidget.edui().show($btn,{
33 | offsetTop:-5,
34 | offsetLeft:10,
35 | caretLeft:11,
36 | caretTop:-8
37 | });
38 |
39 | ;
40 | equal($popupWidget.edui().getBodyContainer()!=null, true, '检查getBodyContaine是否正常');
41 |
42 | setTimeout(function(){
43 |
44 | var isshow = $popupWidget.css("display") != "none";
45 | equal(isshow, true, '检查popup是否显示');
46 |
47 | $popupWidget.edui().hide();
48 | var ishide = $popupWidget.css("display") == "none";
49 | equal(ishide, true, '检查popup是否隐藏');
50 |
51 | start();
52 | $(div).remove();
53 | },100);
54 | stop();
55 | });
--------------------------------------------------------------------------------
/_test/ui/scale.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: dongyancen
4 | * Date: 13-8-1
5 | * Time: 下午3:41
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module( 'ui.scale' );
9 |
10 | test( '鼠标在八个角上拖拽改变图片大小', function() {
11 | if ( ua.browser.webkit ) {
12 | var sc = document.createElement("script");
13 | sc.id="sc";
14 | sc.type = "text/plain";
15 | document.body.appendChild(sc);
16 | var editor = UM.getEditor(sc.id, {initialFrameWidth:800,initialFrameHeight:320,autoHeightEnabled:true});
17 | editor.ready(function () {
18 | editor.setContent( '修正webkit下图片选择的问题
修正webkit下图片选择的问题
' );
19 | var img = editor.body.getElementsByTagName( 'img' )[0];
20 |
21 | var $scale = $.eduiscale({'$wrap':editor.$container}).css('zIndex', editor.options.zIndex);
22 | editor.$container.append($scale);
23 | $scale.edui().show($(img));
24 | ok($scale.css('display')!='none', "检查八个角是否已出现");
25 |
26 | var width = $scale.width(),
27 | height = $scale.height();
28 |
29 | ua.mousedown( $scale.find('.edui-scale-hand0')[0], {clientX: 322, clientY: 281} );
30 | ua.mousemove( document, {clientX: 352, clientY: 301} );
31 | equal(width-$scale.width(), 30, "检查鼠标拖拽中图片宽度是否正确 --");
32 | equal(height-$scale.height(), 20, "检查鼠标拖拽中图片高度是否正确 --");
33 |
34 | ua.mousemove( document, {clientX: 382, clientY: 321} );
35 | ua.mouseup( document, {clientX: 382, clientY: 321} );
36 | equal(width-$scale.width(), 60, "检查鼠标拖拽完毕图片高度是否正确 --");
37 | equal(height-$scale.height(), 40, "检查鼠标拖拽完毕图片高度是否正确 --");
38 | ok($(img).width() == $scale.width() && $(img).height() == $scale.height(), "检查八个角和图片宽高度是否相等");
39 |
40 | $scale.edui().hide();
41 | ok($scale.css('display')=='none', "检查八个角是否已消失");
42 | domUtils.remove(editor.container);
43 | start();
44 | });
45 | stop();
46 | }
47 | } );
--------------------------------------------------------------------------------
/_test/ui/separator.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午5:18
6 | * To change this template use File | Settings | File Templates.
7 | */
8 |
9 | module('ui.separator');
10 |
11 | test('separator--初始化', function () {
12 | var div = document.body.appendChild(document.createElement('div'));
13 | $(div).attr('id', 'test');
14 |
15 | var $separatorWidget = $.eduiseparator().appendTo(div);
16 | equal($separatorWidget.parent()!=null,true, '判断ui是否已插入到dom上');
17 | equal($separatorWidget.hasClass('edui-separator'),true, '判断ui的html内容是否正确');
18 | $separatorWidget.parent();
19 | $(div).remove();
20 | });
21 |
--------------------------------------------------------------------------------
/_test/ui/splitbutton.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午5:18
6 | * To change this template use File | Settings | File Templates.
7 | */
8 |
9 | module('ui.splitbutton');
10 |
11 | test('splitbutton--初始化', function () {
12 | var div = document.body.appendChild(document.createElement('div'));
13 | $(div).attr('id', 'test');
14 |
15 | var $btn = $.eduisplitbutton({
16 | "icon":"forecolor",
17 | "caret":true,
18 | "name":"forecolor",
19 | "title":"字体颜色",
20 | "click":function(){
21 | this.root().addClass('afterBtnClick');
22 | }
23 | }).appendTo(div);
24 | $btn.edui().disabled(true);
25 | equal($btn.hasClass('edui-disabled'), true, '检查是否有disabled的class');
26 | $btn.edui().disabled(false);
27 | equal($btn.hasClass('edui-disabled'), false, '检查是否没有disabled的class');
28 |
29 | $btn.edui().active(true);
30 | equal($btn.edui().active(), true, '检查是否有disabled的class');
31 | $btn.edui().active(false);
32 | equal($btn.edui().active(), false, '检查是否有disabled的class');
33 |
34 | $popup = $.eduipopup({
35 | subtpl: 'popup text',
36 | width: '100',
37 | height: '100'
38 | });
39 | equal($popup.edui().data('$mergeObj')==null, true, '检查是否没有disabled的class');
40 | $btn.edui().mergeWith($popup);
41 | equal($popup.edui().data('$mergeObj')!=null, true, '检查是否有disabled的class');
42 |
43 | $btn.find('.edui-btn:first').trigger('click');
44 | $btn.find('.edui-dropdown-toggle').trigger('click');
45 | setTimeout(function(){
46 | equal($btn.hasClass('afterBtnClick'), true, '判断点击是否触发设定好的监听函数');
47 | equal($popup.css('display')!='none', true, '判断是否已出现颜色选择面板');
48 | start();
49 | }, 50);
50 |
51 | $(div).remove();
52 | stop();
53 | });
54 |
--------------------------------------------------------------------------------
/_test/ui/tab.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: xuheng
4 | * Date: 13-8-1
5 | * Time: 下午3:41
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module('ui.tab');
9 |
10 | test('tab--初始化 操作', function () {
11 | var div = document.body.appendChild(document.createElement('div'));
12 | div.innerHTML = '' +
13 | '- 1
' +
14 | '- 2
' +
15 | '
' +
16 | '' +
17 | '
1个
' +
18 | '
2个
' +
19 | '
';
20 | $(div).attr('id', 'edui-test');
21 | stop();
22 | setTimeout(function () {
23 | $tab = $.eduitab({selector: "#edui-test"})
24 | .edui();
25 |
26 | var index=$tab.activate();
27 | equal(index,0,'检查tab初始化时应该显示第一个tab');
28 |
29 | var $tgt=$('[href="#edui-test2"]',$tab.root());
30 | ua.click($tgt[0]);
31 | var index2=$tab.activate();
32 | equal(index2,1,'检查点击第2个tab时应该显示第2个tab');
33 |
34 | div.parentNode.removeChild(div);
35 | start();
36 | });
37 | });
38 |
--------------------------------------------------------------------------------
/_test/ui/toolbar.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午5:19
6 | * To change this template use File | Settings | File Templates.
7 | */
8 |
9 | module('ui.toolbar');
10 |
11 | test('toolbar--初始化', function () {
12 | var div = document.body.appendChild(document.createElement('div'));
13 | $(div).attr('id', 'test');
14 |
15 | var $toolbarWidget = $.eduitoolbar().appendTo(div);
16 | equal($toolbarWidget.parent()!=null,true, '判断ui是否已插入到dom上');
17 | equal($toolbarWidget.hasClass('edui-toolbar'),true, '判断ui的html内容是否正确');
18 |
19 | var $btn = $.eduibutton({
20 | icon: "bold",
21 | title: "测试按钮"
22 | });
23 |
24 | $toolbarWidget.edui().appendToBtnmenu([$btn]);
25 | equal($toolbarWidget.html().indexOf('测试按钮')!=-1,true, '判断按钮是否已插入到toolbar');
26 |
27 | $(div).remove();
28 | });
29 |
--------------------------------------------------------------------------------
/_test/ui/tools.js:
--------------------------------------------------------------------------------
1 | /**
2 |
3 | */
4 | (function () {
5 | function mySetup() {
6 | for (var config in window.UMDITOR_CONFIG) {
7 | if (typeof(window.UMDITOR_CONFIG[config]) == 'string')
8 | window.UMDITOR_CONFIG[config] = window.UMDITOR_CONFIG[config].replace('_test/tools/br/', '');
9 | }
10 | var div = document.body.appendChild(document.createElement('div'));
11 | $(div).css('width', '500px').css('height', '500px').css('border', '1px solid #ccc').attr('id', 'testeditor');
12 | var editor = UM.getEditor(div.id, {'initialContent':'欢迎使用umeditor
', 'autoFloatEnabled':false,webAppKey:'Qr0M9yTEoLIiUSXXQTtq7yFt'});
13 | var ue = new UM.Editor({'UEDITOR_HOME_URL':'../../../', 'autoFloatEnabled':true,webAppKey:'Qr0M9yTEoLIiUSXXQTtq7yFt'});
14 | QUnit.readyFlag =0;
15 | stop();
16 | setTimeout(function(){
17 | editor.ready(function () {
18 | var range = new UM.dom.Range(editor.document,editor.body);
19 | te.dom.push(div);
20 | te.obj.push(editor);
21 | te.obj.push(range);
22 | te.obj.push(ue);
23 | QUnit.readyFlag =1;
24 | });
25 | },50);
26 | document.getElementsByClassName = function (eleClassName) {
27 | var getEleClass = [];//定义一个数组
28 | var myclass = new RegExp("\\b" + eleClassName + "\\b");//创建一个正则表达式对像
29 | var elem = this.getElementsByTagName("*");//获取文档里所有的元素
30 | for (var h = 0; h < elem.length; h++) {
31 | var classes = elem[h].className;//获取class对像
32 | if (myclass.test(classes)) getEleClass.push(elem[h]);//正则比较,取到想要的CLASS对像
33 | }
34 | return getEleClass;//返回数组
35 | }
36 | }
37 |
38 | var _d = function () {
39 | UM.delEditor('testeditor');
40 | te.dom.push(te.obj[0].container);
41 | document.getElementById('testeditor')&&te.dom.push(document.getElementById('testeditor'));
42 | if (te) {
43 | if (te.dom && te.dom.length) {
44 | for (var i = 0; i < te.dom.length; i++) {
45 | if (te.dom[i] && te.dom[i].parentNode)
46 | te.dom[i].parentNode.removeChild(te.dom[i]);
47 | }
48 |
49 | }
50 | }
51 | te.dom = [];
52 | te.obj = [];
53 | }
54 | var s = QUnit.testStart, d = QUnit.testDone;
55 | QUnit.testStart = function () {
56 | s.apply(this, arguments);
57 | mySetup();
58 | };
59 | QUnit.testDone = function () {
60 | _d();
61 | d.apply(this, arguments);
62 | }
63 | })();
--------------------------------------------------------------------------------
/_test/ui/tooltip.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: xuheng
4 | * Date: 13-8-20
5 | * Time: 下午4:19
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module('ui.tooltip');
9 |
10 | test('tooltip', function () {
11 | var div = document.body.appendChild(document.createElement('div'));
12 | var $btn=$.eduibutton({
13 | icon : "bold",
14 | title: "测试"
15 | }).appendTo(div);
16 |
17 | $(div).attr('id', 'edui-test');
18 | $.eduitooltip('attachTo',$btn);
19 |
20 | setTimeout(function () {
21 | if(browser.ie){
22 | ua.mouseenter($btn[0]);
23 | }else{
24 | ua.mouseover($btn[0]);
25 | }
26 | var isshow=$(".edui-tooltip",$btn).css("display")!="none";
27 | equal(isshow,true,"检查按钮提示是否显示");
28 |
29 | ua.click($btn[0]);
30 |
31 | var ishide=$(".edui-tooltip",$btn).css("display")=="none";
32 |
33 | equal(ishide,true,"检查按钮提示是否隐藏");
34 |
35 |
36 | $btn.edui().disabled(true);
37 | if(browser.ie){
38 | ua.mouseenter($btn[0]);
39 | }else{
40 | ua.mouseover($btn[0]);
41 | }
42 | isHide=$(".edui-tooltip",$btn).css("display")=="none";
43 | equal(isHide,true,"检查不可用的按钮不应该有提示");
44 |
45 | div.parentNode.removeChild(div);
46 |
47 | start();
48 | });
49 | stop();
50 | });
--------------------------------------------------------------------------------
/_test/ui/widget.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created with JetBrains PhpStorm.
3 | * User: Jinqn
4 | * Date: 13-9-2
5 | * Time: 下午5:19
6 | * To change this template use File | Settings | File Templates.
7 | */
8 | module('ui.widget');
9 | test('widget--初始化',function(){
10 | var div = document.body.appendChild(document.createElement('div'));
11 | $(div).attr('id', 'test');
12 |
13 | var $widget = $.eduibutton({
14 | icon: "bold",
15 | title: "测试"
16 | }).appendTo(div),
17 | widgetedui = $widget.edui(),
18 | AddClassHandler = function(){
19 | $widget.addClass('testWidget');
20 | };
21 | equal($widget.parent()!=null, true, '判断ui是否已插入到dom上');
22 |
23 | //测试on和trigger方法
24 | widgetedui.on('click', AddClassHandler);
25 | widgetedui.trigger('click');
26 | equal($widget.hasClass('testWidget'), true, '判断是否已设置testWidget的class');
27 |
28 | $widget.removeClass('testWidget');
29 | equal($widget.hasClass('testWidget'), false, '判断是已去除testWidget的class');
30 |
31 | //测试off和trigger方法
32 | widgetedui.off('click', AddClassHandler);
33 | widgetedui.trigger('click');
34 | equal($widget.hasClass('testWidget'), false, '判断是否没有testWidget的class');
35 |
36 | //测试root和register方法
37 | widgetedui.register('click', widgetedui.root(), function(){
38 | $widget.addClass('registerClick');
39 | });
40 | equal($widget.hasClass('registerClick'), false, '判断是否未设置registerClick的class');
41 | $widget.parent().trigger('click');
42 | equal($widget.hasClass('registerClick'), true, '判断是否已设置registerClick的class');
43 |
44 | //测试data方法
45 | widgetedui.data('testdata', '123456');
46 | equal(widgetedui.data('testdata'), '123456', '判断是否data数据是否设置正常');
47 | });
48 |
--------------------------------------------------------------------------------
/_test/关键字.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/_test/关键字.txt
--------------------------------------------------------------------------------
/changelog.md:
--------------------------------------------------------------------------------
1 | # UMeditor Change List
2 |
3 | ## 1.2.2
4 |
5 | ### 功能更新
6 | 1. **添加插入数学公式**
7 | 2. 支持插入动态地图
8 | 3. 支持复制图片、截屏图片的粘贴
9 | 4. 添加自动保存插件,支持草稿箱功能
10 | 5. 支持拖放图片上传并插入
11 | 6. 优化了对IE11的支持
12 | 7. 支持asp后台
13 |
14 | ### 问题修复
15 | 1. 修复表情本地化出错问题
16 | 2. 修复jquery的$变量冲突问题
17 | 3. 修复多编辑器,弹层被遮挡和出错问题
18 | 4. 解决于bootstrap的冲突
19 | 5. 修复粘贴后光标定位错误的问题
20 | 6. 修复一坨坨的细节BUG
21 |
22 |
23 | ## 1.0.0
24 |
25 | ### 主要特点
26 | 1. 采用div作为编辑容器,加快加载速度
27 | 2. 采用原生编辑命令策略,减少代码整体代码量,也加快了执行的速度
28 | 3. 将原有ueditor的ui层,拆解为ui与adapter两层,进一步方便扩展功能
29 | 4. 整个项目基于jquery
30 | 5. 新增图片拖拽上传功能
31 | 6. 新增chrome浏览器下可视化的图片修改大小
32 | 7. 更加丰富的示例代码
33 | 8. 使用grunt作为部署
34 |
--------------------------------------------------------------------------------
/dialogs/emotion/emotion.css:
--------------------------------------------------------------------------------
1 | .edui-popup-emotion .edui-emotion-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 | .edui-popup-emotion .edui-emotion-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 |
10 | .edui-popup-emotion .edui-emotion-ldw img{
11 | background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
12 | cursor:pointer;width:35px;height:35px;display:block;
13 | }
14 |
15 | .edui-popup-emotion .edui-emotion-tsj img{
16 | background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
17 | cursor:pointer;width:35px;height:35px;display:block;
18 | }
19 |
20 | .edui-popup-emotion .edui-emotion-cat img{
21 | background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
22 | cursor:pointer;width:35px;height:35px;display:block;
23 | }
24 |
25 | .edui-popup-emotion .edui-emotion-bb img{
26 | background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
27 | cursor:pointer;width:35px;height:35px;display:block;
28 | }
29 |
30 | .edui-popup-emotion .edui-emotion-youa img{
31 | background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
32 | cursor:pointer;width:35px;height:35px;display:block;
33 | }
34 |
35 | .edui-popup-emotion .edui-emotion-smileytable {
36 | width: 100%;
37 | border-spacing: 0;
38 | border-collapse: collapse;
39 | table-layout: fixed;
40 | }
41 |
42 | .edui-popup-emotion .edui-emotion-wrapper {
43 | padding: 15px;
44 | }
45 |
46 | .edui-popup-emotion .edui-tab-nav{
47 | height: auto;
48 | *height: 31px;
49 | }
50 | .edui-popup-emotion .edui-emotion-tabs{
51 | clear: both;
52 | width: 0;
53 | height: 0;
54 | }
55 |
56 | .edui-popup-emotion .edui-tab-content {
57 | padding: 15px 0;
58 | }
59 |
60 | .edui-popup-emotion .edui-emotion-preview-box {
61 | width:90px;
62 | height:76px;
63 | border:2px solid #9cb945;
64 | background:#FFFFFF;
65 | background-position:center;
66 | background-repeat:no-repeat;
67 | position: absolute;
68 | top: 67px;
69 | left: 494px;
70 | display: none;
71 | }
72 |
73 | .edui-popup-emotion .edui-tab-text {
74 | font-size: 12px;
75 | }
76 |
77 | .edui-popup-emotion .edui-emotion-preview-left {
78 | left: 15px;
79 | }
80 |
81 | .edui-popup-emotion .edui-emotion-preview-img {
82 | width: 100%;
83 | height: 100%;
84 | display: block;
85 | background-repeat: no-repeat;
86 | background-position: center center;
87 | }
88 |
--------------------------------------------------------------------------------
/dialogs/emotion/images/0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/0.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/bface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/bface.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/cface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/cface.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/fface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/fface.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/jxface2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/jxface2.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/neweditor-tab-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/neweditor-tab-bg.png
--------------------------------------------------------------------------------
/dialogs/emotion/images/tface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/tface.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/wface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/wface.gif
--------------------------------------------------------------------------------
/dialogs/emotion/images/yface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/emotion/images/yface.gif
--------------------------------------------------------------------------------
/dialogs/formula/formula.css:
--------------------------------------------------------------------------------
1 | .edui-popup-formula .edui-formula-wrapper {
2 | padding: 15px;
3 | }
4 | .edui-popup-formula .edui-formula-wrapper .edui-tab-nav{
5 | height: auto;
6 | *height: 31px;
7 | }
8 | .edui-popup-formula .edui-formula-wrapper .edui-tab-text {
9 | font-size: 12px;
10 | }
11 | .edui-popup-formula .edui-formula-wrapper .edui-formula-clearboth {
12 | clear: both;
13 | width: 0;
14 | height: 0;
15 | }
16 | .edui-popup-formula .edui-formula-wrapper .edui-tab-pane ul {
17 | margin: 0px;
18 | padding: 0px;
19 | }
20 | .edui-popup-formula .edui-formula-wrapper .edui-tab-content {
21 | padding: 5px 0px 0px 0px;
22 | }
23 | .edui-popup-formula .edui-formula-wrapper .edui-tab-pane .edui-formula-latex-item {
24 | display: block;
25 | float: left;
26 | margin: 0px 3px 3px 0px;
27 | width: 30px;
28 | height: 30px;
29 | border:1px solid #cccccc;
30 | background-image: url("images/formula.png");
31 | cursor: pointer;
32 | }
--------------------------------------------------------------------------------
/dialogs/formula/images/formula.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/formula/images/formula.png
--------------------------------------------------------------------------------
/dialogs/image/images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/image/images/close.png
--------------------------------------------------------------------------------
/dialogs/image/images/upload1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/image/images/upload1.png
--------------------------------------------------------------------------------
/dialogs/image/images/upload2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/image/images/upload2.png
--------------------------------------------------------------------------------
/dialogs/video/images/center_focus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/video/images/center_focus.jpg
--------------------------------------------------------------------------------
/dialogs/video/images/left_focus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/video/images/left_focus.jpg
--------------------------------------------------------------------------------
/dialogs/video/images/none_focus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/video/images/none_focus.jpg
--------------------------------------------------------------------------------
/dialogs/video/images/right_focus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/dialogs/video/images/right_focus.jpg
--------------------------------------------------------------------------------
/dialogs/video/video.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | .edui-dialog-video .edui-video-wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative}
3 | .edui-dialog-video .edui-video-tabbody{height:335px;}
4 | .edui-dialog-video .edui-video-panel { position: absolute;width:100%; height:100%;background: #fff;}
5 | .edui-dialog-video .edui-video-panel table td{vertical-align: middle;}
6 | .edui-dialog-video #eduiVideoUrl {
7 | width: 470px;
8 | height: 21px;
9 | line-height: 21px;
10 | margin: 8px 5px;
11 | background: #FFF;
12 | border: 1px solid #d7d7d7;
13 | }
14 | .edui-dialog-video #eduiVideoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;}
15 | .edui-dialog-video #searchList{width: 570px;overflow: auto;zoom:1;height: 270px;}
16 | .edui-dialog-video #searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;}
17 | .edui-dialog-video #searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/
18 | .edui-dialog-video #searchList p{margin-left: 10px;}
19 | .edui-dialog-video #eduiVideoType{
20 | width: 65px;
21 | height: 23px;
22 | line-height: 22px;
23 | border: 1px solid #d7d7d7;
24 | }
25 | .edui-dialog-video #eduiVideoSearchBtn,.edui-dialog-video #eduiVideoSearchReset{
26 | /*width: 80px;*/
27 | height: 25px;
28 | line-height: 25px;
29 | background: #eee;
30 | border: 1px solid #d7d7d7;
31 | cursor: pointer;
32 | padding: 0 5px;
33 | }
34 |
35 |
36 |
37 | .edui-dialog-video #eduiVideoPreview{width: 420px; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left}
38 | .edui-dialog-video #eduiVideoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;}
39 | .edui-dialog-video .edui-video-wrapper fieldset{
40 | border: 1px solid #ddd;
41 | padding-left: 5px;
42 | margin-bottom: 20px;
43 | padding-bottom: 5px;
44 | width: 115px;
45 | }
46 | .edui-dialog-video .edui-video-wrapper fieldset legend{font-weight: bold;}
47 | .edui-dialog-video .edui-video-wrapper fieldset p{line-height: 30px;}
48 | .edui-dialog-video .edui-video-wrapper fieldset input.edui-video-txt{
49 | width: 65px;
50 | height: 21px;
51 | line-height: 21px;
52 | margin: 8px 5px;
53 | background: #FFF;
54 | border: 1px solid #d7d7d7;
55 | }
56 | .edui-dialog-video .edui-video-wrapper label.edui-video-url{font-weight: bold;margin-left: 5px;color: #06c;}
57 | .edui-dialog-video #eduiVideoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;}
58 | .edui-dialog-video #eduiVideoFloat .edui-video-focus{opacity: 1;filter: alpha(opacity = 100)}
59 | .edui-dialog-video .edui-video-wrapper span.edui-video-view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue}
--------------------------------------------------------------------------------
/lang/en/images/addimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/addimage.png
--------------------------------------------------------------------------------
/lang/en/images/alldeletebtnhoverskin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/alldeletebtnhoverskin.png
--------------------------------------------------------------------------------
/lang/en/images/alldeletebtnupskin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/alldeletebtnupskin.png
--------------------------------------------------------------------------------
/lang/en/images/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/background.png
--------------------------------------------------------------------------------
/lang/en/images/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/button.png
--------------------------------------------------------------------------------
/lang/en/images/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/copy.png
--------------------------------------------------------------------------------
/lang/en/images/deletedisable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/deletedisable.png
--------------------------------------------------------------------------------
/lang/en/images/deleteenable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/deleteenable.png
--------------------------------------------------------------------------------
/lang/en/images/imglabel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/imglabel.png
--------------------------------------------------------------------------------
/lang/en/images/listbackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/listbackground.png
--------------------------------------------------------------------------------
/lang/en/images/localimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/localimage.png
--------------------------------------------------------------------------------
/lang/en/images/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/music.png
--------------------------------------------------------------------------------
/lang/en/images/rotateleftdisable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/rotateleftdisable.png
--------------------------------------------------------------------------------
/lang/en/images/rotateleftenable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/rotateleftenable.png
--------------------------------------------------------------------------------
/lang/en/images/rotaterightdisable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/rotaterightdisable.png
--------------------------------------------------------------------------------
/lang/en/images/rotaterightenable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/rotaterightenable.png
--------------------------------------------------------------------------------
/lang/en/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/en/images/upload.png
--------------------------------------------------------------------------------
/lang/zh-cn/images/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/zh-cn/images/copy.png
--------------------------------------------------------------------------------
/lang/zh-cn/images/imglabel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/zh-cn/images/imglabel.png
--------------------------------------------------------------------------------
/lang/zh-cn/images/localimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/zh-cn/images/localimage.png
--------------------------------------------------------------------------------
/lang/zh-cn/images/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/zh-cn/images/music.png
--------------------------------------------------------------------------------
/lang/zh-cn/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/lang/zh-cn/images/upload.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sui-editor",
3 | "title": "sui-editor",
4 | "description": "sui-editor",
5 | "version": "0.0.1",
6 | "homepage": "https://github.com/sdc-alibaba/sui-editor",
7 | "repository": {
8 | "type": "git",
9 | "url": "git@github.com:sdc-alibaba/sui-editor.git"
10 | },
11 | "keywords": [
12 | "sui-editor",
13 | "web editor",
14 | "sui editor",
15 | "javascript"
16 | ],
17 | "dependencies": {
18 | "grunt": "^0.4.5",
19 | "grunt-contrib-concat": "^0.5.0",
20 | "grunt-contrib-copy": "^0.6.0",
21 | "grunt-contrib-less": "^0.11.4",
22 | "grunt-contrib-uglify": "^0.6.0",
23 | "grunt-contrib-watch": "^0.6.1",
24 | "grunt-ejs": "^0.2.0",
25 | "grunt-newer": "^0.7.0",
26 | "load-grunt-tasks": "^0.6.0"
27 | },
28 | "devDependencies": {
29 | "grunt": "~0.4.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/themes/default/images/caret.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/caret.png
--------------------------------------------------------------------------------
/themes/default/images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/close.png
--------------------------------------------------------------------------------
/themes/default/images/icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/icons.gif
--------------------------------------------------------------------------------
/themes/default/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/icons.png
--------------------------------------------------------------------------------
/themes/default/images/ok.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/ok.gif
--------------------------------------------------------------------------------
/themes/default/images/pop-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/pop-bg.png
--------------------------------------------------------------------------------
/themes/default/images/spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/spacer.gif
--------------------------------------------------------------------------------
/themes/default/images/videologo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/themes/default/images/videologo.gif
--------------------------------------------------------------------------------
/themes/default/less/button.less:
--------------------------------------------------------------------------------
1 | /*普通按钮*/
2 | .edui-btn-toolbar .edui-btn{
3 | position: relative;
4 | display: inline-block;
5 | vertical-align: top;
6 | *display: inline;
7 | *zoom:1;
8 | width:auto;
9 | margin: 0 1px;
10 | padding:1px;
11 | border:none;
12 | background: none;
13 | }
14 | .edui-btn-toolbar .edui-btn .edui-icon{
15 | width: 20px;
16 | height: 20px;
17 | margin: 0;
18 | padding:0;
19 | background-repeat: no-repeat;
20 | background-image: url(../images/icons.png);
21 | background-image: ~'url(../images/icons.gif) \9';
22 | }
23 |
24 | /*状态反射*/
25 | .edui-btn-toolbar .edui-btn.edui-hover,
26 | .edui-btn-toolbar .edui-btn.edui-active{
27 | background-color: #d5e1f2;
28 | padding: 0;
29 | border: 1px solid #a3bde3;
30 | _z-index: 1;
31 | }
32 | .edui-btn-toolbar .edui-btn.edui-disabled{
33 | opacity: 0.3;
34 | filter: ~'alpha(opacity = 30)';
35 | }
36 |
--------------------------------------------------------------------------------
/themes/default/less/colorpicker.less:
--------------------------------------------------------------------------------
1 | .edui-splitbutton-color-label {
2 | width: 16px;
3 | height: 3px;
4 | position: absolute;
5 | bottom: 2px;
6 | left: 50%;
7 | margin-left: -8px;
8 | overflow: hidden;
9 | line-height: 3px;
10 | }
11 | .edui-popup .edui-colorpicker {
12 | margin: 10px;
13 | font-size: 12px;
14 | }
15 | .edui-colorpicker .edui-colorpicker-topbar{
16 | height: 27px;
17 | width: 200px;
18 | overflow: hidden;
19 | }
20 | .edui-colorpicker .edui-colorpicker-topbar .edui-colorpicker-preview{
21 | height: 20px;
22 | border: 1px inset black;
23 | margin-left: 1px;
24 | width: 128px;
25 | float: left;
26 | }
27 | .edui-colorpicker .edui-colorpicker-topbar .edui-colorpicker-nocolor{
28 | float: right;
29 | margin-right: 1px;
30 | font-size: 12px;
31 | line-height: 14px;
32 | height: 14px;
33 | border: 1px solid #333;
34 | padding: 3px 5px;
35 | cursor: pointer;
36 | }
37 | .edui-colorpicker table{
38 | border-collapse: collapse;
39 | border-spacing: 2px;
40 | }
41 | .edui-colorpicker tr.edui-colorpicker-firstrow{
42 | height: 30px;
43 | }
44 | .edui-colorpicker table td{
45 | padding: 0 2px;
46 | }
47 | .edui-colorpicker table td .edui-colorpicker-colorcell{
48 | display: block;
49 | text-decoration: none;
50 | color: black;
51 | width: 14px;
52 | height: 14px;
53 | margin: 0;
54 | cursor: pointer;
55 | }
--------------------------------------------------------------------------------
/themes/default/less/combobox.less:
--------------------------------------------------------------------------------
1 | .edui-btn-toolbar .edui-combobox{
2 | border: 1px solid #CCC;
3 | padding:0;
4 | margin:0 2px;
5 | line-height: 20px;
6 | }
7 | .edui-combobox .edui-button-label{
8 | position: relative;
9 | display: inline-block;
10 | vertical-align: top;
11 | *display: inline ;
12 | *zoom:1;
13 | width:60px;
14 | height:20px;
15 | line-height: 20px;
16 | padding: 2px;
17 | margin: 0;
18 | font-size: 12px;
19 | text-align: center;
20 | cursor: default;
21 | }
22 | .edui-combobox .edui-button-spacing{
23 | position: relative;
24 | display: inline-block ;
25 | vertical-align: top;
26 | *display: inline ;
27 | *zoom:1;
28 | height:20px;
29 | margin: 0;
30 | padding:0 3px;
31 | }
32 | .edui-combobox .edui-caret{
33 | position: relative;
34 | display: inline-block ;
35 | vertical-align: top;
36 | *display: inline ;
37 | *zoom:1;
38 | height:20px;
39 | width: 12px;
40 | margin: 0;
41 | padding: 0;
42 | background: url(../images/icons.png) -741px 0;
43 | _background: url(../images/icons.gif) -741px 0;
44 | }
45 | .edui-btn-toolbar .edui-combobox.edui-disabled{
46 | opacity: 0.2;
47 | filter: ~'alpha(opacity = 20)';
48 | }
49 | .edui-btn-toolbar .edui-combobox.edui-disabled .edui-button-label,
50 | .edui-btn-toolbar .edui-combobox.edui-disabled .edui-caret{
51 | opacity: ~'0.2 \0';
52 | filter: ~'alpha(opacity = 20)\0';
53 | }
54 |
--------------------------------------------------------------------------------
/themes/default/less/dialog.less:
--------------------------------------------------------------------------------
1 | .edui-modal {
2 | position: fixed;
3 | _position: absolute;
4 | top: 10%;
5 | left: 50%;
6 | border: 1px solid #acacac;
7 | box-shadow: 2px 2px 5px #d3d6da;
8 | background-color: #ffffff;
9 | outline: 0;
10 | }
11 | .edui-modal-header {
12 | padding: 5px 10px;
13 | border-bottom: 1px solid #eee;
14 | }
15 | .edui-modal-header .edui-close {
16 | float: right;
17 | width:20px;
18 | height:20px;
19 | margin-top: 2px;
20 | padding: 1px;
21 | border: 0;
22 | background: url("../images/close.png") no-repeat center center;
23 | cursor: pointer;
24 | }
25 | .edui-modal-header .edui-close.edui-hover {
26 | background-color: #d5e1f2;
27 | padding:0;
28 | border: 1px solid #a3bde3;
29 | }
30 | .edui-modal-header .edui-title {
31 | margin: 0;
32 | line-height: 25px;
33 | font-size: 20px;
34 | }
35 | .edui-modal-body {
36 | position: relative;
37 | max-height: 400px;
38 | font-size: 12px;
39 | overflow-y: auto;
40 | }
41 | .edui-modal-footer {
42 | float: right;
43 | padding: 5px 15px 15px;
44 | overflow: hidden;
45 | }
46 | .edui-modal-footer .edui-btn {
47 | float: left;
48 | height: 24px;
49 | width: 96px;
50 | margin: 0 10px;
51 | background-color: #ffffff;
52 | padding: 0;
53 | border: 1px solid #ababab;
54 | font-size: 12px;
55 | line-height: 24px;
56 | text-align: center;
57 | cursor: pointer;
58 | }
59 | .edui-modal-footer .edui-btn.edui-hover{
60 | background-color: #d5e1f2;
61 | border: 1px solid #a3bde3;
62 | }
63 | .edui-modal-backdrop{
64 | opacity: 0.5;
65 | filter: ~'alpha(opacity=50)';
66 | position: fixed;
67 | top: 0;
68 | right: 0;
69 | bottom: 0;
70 | left: 0;
71 | background-color: #c6c6c6;
72 | }
73 |
74 | .edui-modal .edui-modal-tip {
75 | color: red;
76 | position: absolute;
77 | bottom: 10px;
78 | left: 10px;
79 | height: 30px;
80 | line-height: 30px;
81 | display: none;
82 | }
83 |
--------------------------------------------------------------------------------
/themes/default/less/dialogsize.less:
--------------------------------------------------------------------------------
1 | /*图片上传*/
2 | .edui-dialog-image-body {
3 | width: 700px;
4 | height: 400px;
5 | }
6 | /*插入视频*/
7 | .edui-dialog-video-body{
8 | width: 600px;
9 | height: 350px;
10 | }
11 | /*谷歌地图*/
12 | .edui-dialog-gmap-body{
13 | width:550px;
14 | height: 400px;
15 | }
16 |
17 | /*百度地图*/
18 | .edui-dialog-map-body{
19 | width:580px;
20 | height: 400px;
21 | }
22 |
23 | /*链接*/
24 | .edui-dialog-link-body{
25 | width:400px;
26 | height:200px;
27 | }
--------------------------------------------------------------------------------
/themes/default/less/editor.less:
--------------------------------------------------------------------------------
1 | .edui-container{
2 | position: relative;
3 | border: 1px solid #d4d4d4;
4 | box-shadow: 2px 2px 5px #d3d6da;
5 | background-color: #fff;
6 | }
7 | .edui-container .edui-toolbar{
8 | position: relative;
9 | width:auto;
10 | border-bottom: 1px solid #e1e1e1;
11 | box-shadow: 2px 2px 5px #d3d6da;
12 | background-color: #fafafa;
13 | z-index: 99999;
14 | }
15 | .edui-toolbar .edui-btn-toolbar{
16 | position: relative;
17 | padding: 5px;
18 | }
19 | .edui-container .edui-editor-body{
20 | background-color: #fff;
21 | }
22 | .edui-editor-body .edui-body-container{
23 | }
24 |
25 | .edui-editor-body .edui-body-container p{margin:5px 0;}
26 | .edui-editor-body .edui-body-container{
27 | border:0;
28 | outline:none;
29 | cursor:text;
30 | padding:0 10px 0;
31 | overflow:auto;
32 | display:block;
33 | word-wrap:break-word;
34 | font-size:16px;
35 | font-family:sans-serif;
36 | }
37 | .edui-editor-body.focus{border:1px solid #5c9dff}
38 | .edui-editor-body table{margin:10px 0 10px;border-collapse:collapse;display:table;}
39 | .edui-editor-body td{padding: 5px 10px;border: 1px solid #DDD;}
40 | .edui-editor-body iframe.mathquill-embedded-latex{
41 | border: 0px;
42 | padding: 0px;
43 | display: inline;
44 | margin: 0px;
45 | background: none;
46 | vertical-align: middle;
47 | width: 0px;
48 | height: 0px;
49 | }
--------------------------------------------------------------------------------
/themes/default/less/popup.less:
--------------------------------------------------------------------------------
1 | .edui-popup{
2 | display: none;
3 | background: url('../images/pop-bg.png') repeat #fff;
4 | padding: 2px;
5 | }
6 | .edui-popup .edui-popup-body{
7 | border: 1px solid #bfbfbf;
8 | background-color: #fff;
9 | }
10 | .edui-popup .edui-popup-caret{
11 | width: 21px;
12 | height: 11px;
13 | }
14 | .edui-popup .edui-popup-caret.up{
15 | background:url('../images/caret.png') no-repeat 0 0;
16 | }
17 | .edui-popup .edui-popup-caret.down{
18 | background:url('../images/caret.png') no-repeat 0 0;
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/themes/default/less/separator.less:
--------------------------------------------------------------------------------
1 | .edui-toolbar .edui-separator{
2 | width: 2px;
3 | height: 20px;
4 | padding: 1px 2px;
5 | background: url(../images/icons.png) -179px 1px;
6 | background: ~'url(../images/icons.gif) -179px 1px \9';
7 | display: inline-block ;
8 | vertical-align: top;
9 | *display: inline ;
10 | *zoom:1;
11 | border:none;
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/themes/default/less/splitbutton.less:
--------------------------------------------------------------------------------
1 | .edui-btn-toolbar .edui-splitbutton{
2 | position: relative;
3 | display: inline-block ;
4 | vertical-align: top;
5 | *display: inline ;
6 | *zoom:1;
7 | margin:0 2px;
8 | }
9 | .edui-splitbutton .edui-btn{
10 | margin: 0;
11 | }
12 | .edui-splitbutton .edui-caret{
13 | position: relative;
14 | display: inline-block ;
15 | vertical-align: top;
16 | *display: inline ;
17 | *zoom:1;
18 | width: 8px;
19 | height: 20px;
20 | background: url(../images/icons.png) -741px 0;
21 | _background: url(../images/icons.gif) -741px 0;
22 | }
23 |
24 | .edui-btn-toolbar .edui-splitbutton,
25 | .edui-btn-toolbar .edui-splitbutton{
26 | _border: none;
27 | }
28 |
29 | /*状态反射*/
30 | .edui-btn-toolbar .edui-splitbutton.edui-hover .edui-btn{
31 | background-color: #d5e1f2;
32 | }
33 |
34 | .edui-btn-toolbar .edui-splitbutton.edui-disabled{
35 | opacity: 0.3;
36 | filter: ~'alpha(opacity = 30)';
37 | }
38 | .edui-btn-toolbar .edui-splitbutton.edui-disabled .edui-caret{
39 | opacity: ~'0.3 \0';
40 | filter: ~'alpha(opacity = 30)\0';
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/themes/default/less/sui-editor.less:
--------------------------------------------------------------------------------
1 | @import "editor.less";
2 | @import "button.less";
3 | @import "buttonicon.less";
4 | @import "splitbutton.less";
5 | @import "combobox.less";
6 | @import "comboboxmenu.less";
7 | @import "dialog.less";
8 | @import "dialogsize.less";
9 | @import "popup.less";
10 | @import "tab.less";
11 | @import "tooltip.less";
12 | @import "colorpicker.less";
13 | @import "separator.less";
14 |
--------------------------------------------------------------------------------
/themes/default/less/tab.less:
--------------------------------------------------------------------------------
1 | .edui-tab-nav {
2 | margin: 0;
3 | padding:0;
4 | border-bottom: 1px solid #ddd;
5 | list-style: none;
6 | height:30px;
7 | }
8 | .edui-tab-nav .edui-tab-item {
9 | float:left;
10 | margin-bottom: -1px;
11 | margin-top: 1px;
12 | margin-top: ~'0\9';
13 | }
14 | .edui-tab-nav .edui-tab-item .edui-tab-text{
15 | display: block;
16 | padding:8px 12px;
17 | border: 1px solid transparent;
18 | color: #0088cc;
19 | text-decoration: none;
20 | outline: 0;
21 | _border:1px solid #fff ;
22 | cursor: pointer;
23 | }
24 | .edui-tab-nav .edui-tab-item .edui-tab-text:FOCUS {
25 | outline: none;
26 | }
27 | .edui-tab-nav .edui-tab-item.edui-active .edui-tab-text{
28 | border: 1px solid #ddd;
29 | border-bottom-color: transparent;
30 | background-color: #fff;
31 | padding:8px 12px;
32 | color: #555555;
33 | cursor: default;
34 | }
35 | .edui-tab-content .edui-tab-pane{
36 | padding: 1px;
37 | position: relative;
38 | display: none;
39 | background-color: #fff;
40 | clear: both;
41 | }
42 | .edui-tab-content .edui-tab-pane.edui-active{
43 | display: block;
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/themes/default/less/tooltip.less:
--------------------------------------------------------------------------------
1 | .edui-btn-toolbar .edui-tooltip{
2 | position: absolute;
3 | padding: 5px 0;
4 | display: none;
5 | /*opacity: 0.8;*/
6 | /*filter: alpha(opacity=80);*/
7 | z-index: 99999;
8 | }
9 | .edui-tooltip .edui-tooltip-arrow{
10 | position: absolute;
11 | top: 0;
12 | _top: -2px;
13 | left: 50%;
14 | width: 0;
15 | height: 0;
16 | padding: 0;
17 | font-size:0;
18 | margin-left: -5px;
19 | border-color: transparent;
20 | border-style: dashed dashed solid dashed;
21 | border-bottom-color: #000000;
22 | border-width: 0 5px 5px;
23 | background: transparent;
24 | }
25 | .edui-tooltip .edui-tooltip-inner{
26 | padding: 6px;
27 | color: #ffffff;
28 | text-align: center;
29 | text-decoration: none;
30 | font-size: 10px;
31 | background-color: #000000;
32 | white-space: nowrap;
33 | line-height: 12px;
34 | }
--------------------------------------------------------------------------------
/third-party/mathquill/font/Symbola.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/Symbola.eot
--------------------------------------------------------------------------------
/third-party/mathquill/font/Symbola.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/Symbola.otf
--------------------------------------------------------------------------------
/third-party/mathquill/font/Symbola.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/Symbola.ttf
--------------------------------------------------------------------------------
/third-party/mathquill/font/Symbola.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/Symbola.woff
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf
--------------------------------------------------------------------------------
/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdc-alibaba/sui-editor/62a2a64e0d2c439f4e1daa2b393f345bdffe7bc9/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff
--------------------------------------------------------------------------------