性能优化

This commit is contained in:
alvis 2020-06-22 21:35:16 +08:00
parent e64c9c17c2
commit f11530bc96
69 changed files with 66 additions and 126458 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,81 +1 @@
(function () {
var parent = window.parent;
//dialog对象
dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
//当前打开dialog的编辑器实例
editor = dialog.editor;
UE = parent.UE;
domUtils = UE.dom.domUtils;
utils = UE.utils;
browser = UE.browser;
ajax = UE.ajax;
$G = function ( id ) {
return document.getElementById( id )
};
//focus元素
$focus = function ( node ) {
setTimeout( function () {
if ( browser.ie ) {
var r = node.createTextRange();
r.collapse( false );
r.select();
} else {
node.focus()
}
}, 0 )
};
utils.loadFile(document,{
href: "../themes/default/dialogbase.css?cache="+Math.random(),//xlz原来的路径写错了去掉了一个../
tag:"link",
type:"text/css",
// rel:"stylesheet"
});
lang = editor.getLang(dialog.className.split( "-" )[2]);
if(lang){
domUtils.on(window,'load',function () {
var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
//针对静态资源
for ( var i in lang["static"] ) {
var dom = $G( i );
if(!dom) continue;
var tagName = dom.tagName,
content = lang["static"][i];
if(content.src){
//clone
content = utils.extend({},content,false);
content.src = langImgPath + content.src;
}
if(content.style){
content = utils.extend({},content,false);
content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
}
switch ( tagName.toLowerCase() ) {
case "var":
dom.parentNode.replaceChild( document.createTextNode( content ), dom );
break;
case "select":
var ops = dom.options;
for ( var j = 0, oj; oj = ops[j]; ) {
oj.innerHTML = content.options[j++];
}
for ( var p in content ) {
p != "options" && dom.setAttribute( p, content[p] );
}
break;
default :
domUtils.setAttributes( dom, content);
}
}
} );
}
})();
!function(){var e=window.parent;dialog=e.$EDITORUI[window.frameElement.id.replace(/_iframe$/,"")],editor=dialog.editor,UE=e.UE,domUtils=UE.dom.domUtils,utils=UE.utils,browser=UE.browser,ajax=UE.ajax,$G=function(e){return document.getElementById(e)},$focus=function(t){setTimeout(function(){if(browser.ie){var e=t.createTextRange();e.collapse(!1),e.select()}else t.focus()},0)},utils.loadFile(document,{href:"../themes/default/dialogbase.css?cache="+Math.random(),tag:"link",type:"text/css"}),lang=editor.getLang(dialog.className.split("-")[2]),lang&&domUtils.on(window,"load",function(){var e=editor.options.langPath+editor.options.lang+"/images/";for(var t in lang.static){var a=$G(t);if(a){var o=a.tagName,i=lang.static[t];switch(i.src&&((i=utils.extend({},i,!1)).src=e+i.src),i.style&&((i=utils.extend({},i,!1)).style=i.style.replace(/url\s*\(/g,"url("+e)),o.toLowerCase()){case"var":a.parentNode.replaceChild(document.createTextNode(i),a);break;case"select":for(var s,r=a.options,l=0;s=r[l];)s.innerHTML=i.options[l++];for(var n in i)"options"!=n&&a.setAttribute(n,i[n]);break;default:domUtils.setAttributes(a,i)}}}})}();

View File

@ -1,84 +1 @@
body{
overflow: hidden;
width: 540px;
}
.wrapper {
margin: 10px auto 0;
font-size: 12px;
overflow: hidden;
width: 520px;
height: 315px;
}
.clear {
clear: both;
}
.wrapper .left {
float: left;
margin-left: 10px;;
}
.wrapper .right {
float: right;
border-left: 2px dotted #EDEDED;
padding-left: 15px;
}
.section {
margin-bottom: 15px;
width: 240px;
overflow: hidden;
}
.section h3 {
font-weight: bold;
padding: 5px 0;
margin-bottom: 10px;
border-bottom: 1px solid #EDEDED;
font-size: 12px;
}
.section ul {
list-style: none;
overflow: hidden;
clear: both;
}
.section li {
float: left;
width: 120px;;
}
.section .tone {
width: 80px;;
}
.section .preview {
width: 220px;
}
.section .preview table {
text-align: center;
vertical-align: middle;
color: #666;
}
.section .preview caption {
font-weight: bold;
}
.section .preview td {
border-width: 1px;
border-style: solid;
height: 22px;
}
.section .preview th {
border-style: solid;
border-color: #DDD;
border-width: 2px 1px 1px 1px;
height: 22px;
background-color: #F7F7F7;
}
body{overflow:hidden;width:540px}.wrapper{margin:10px auto 0;font-size:12px;overflow:hidden;width:520px;height:315px}.clear{clear:both}.wrapper .left{float:left;margin-left:10px}.wrapper .right{float:right;border-left:2px dotted #ededed;padding-left:15px}.section{margin-bottom:15px;width:240px;overflow:hidden}.section h3{font-weight:bold;padding:5px 0;margin-bottom:10px;border-bottom:1px solid #ededed;font-size:12px}.section ul{list-style:none;overflow:hidden;clear:both}.section li{float:left;width:120px}.section .tone{width:80px}.section .preview{width:220px}.section .preview table{text-align:center;vertical-align:middle;color:#666}.section .preview caption{font-weight:bold}.section .preview td{border-width:1px;border-style:solid;height:22px}.section .preview th{border-style:solid;border-color:#DDD;border-width:2px 1px 1px 1px;height:22px;background-color:#f7f7f7}

View File

@ -1,237 +1 @@
/**
* Created with JetBrains PhpStorm.
* User: xuheng
* Date: 12-12-19
* Time: 下午4:55
* To change this template use File | Settings | File Templates.
*/
(function () {
var title = $G("J_title"),
titleCol = $G("J_titleCol"),
caption = $G("J_caption"),
sorttable = $G("J_sorttable"),
autoSizeContent = $G("J_autoSizeContent"),
autoSizePage = $G("J_autoSizePage"),
tone = $G("J_tone"),
me,
preview = $G("J_preview");
var editTable = function () {
me = this;
me.init();
};
editTable.prototype = {
init:function () {
var colorPiker = new UE.ui.ColorPicker({
editor:editor
}),
colorPop = new UE.ui.Popup({
editor:editor,
content:colorPiker
});
title.checked = editor.queryCommandState("inserttitle") == -1;
titleCol.checked = editor.queryCommandState("inserttitlecol") == -1;
caption.checked = editor.queryCommandState("insertcaption") == -1;
sorttable.checked = editor.queryCommandState("enablesort") == 1;
var enablesortState = editor.queryCommandState("enablesort"),
disablesortState = editor.queryCommandState("disablesort");
sorttable.checked = !!(enablesortState < 0 && disablesortState >=0);
sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0);
sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:'';
me.createTable(title.checked, titleCol.checked, caption.checked);
me.setAutoSize();
me.setColor(me.getColor());
domUtils.on(title, "click", me.titleHanler);
domUtils.on(titleCol, "click", me.titleColHanler);
domUtils.on(caption, "click", me.captionHanler);
domUtils.on(sorttable, "click", me.sorttableHanler);
domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler);
domUtils.on(autoSizePage, "click", me.autoSizePageHanler);
domUtils.on(tone, "click", function () {
colorPop.showAnchor(tone);
});
domUtils.on(document, 'mousedown', function () {
colorPop.hide();
});
colorPiker.addListener("pickcolor", function () {
me.setColor(arguments[1]);
colorPop.hide();
});
colorPiker.addListener("picknocolor", function () {
me.setColor("");
colorPop.hide();
});
},
createTable:function (hasTitle, hasTitleCol, hasCaption) {
var arr = [],
sortSpan = '<span>^</span>';
arr.push("<table id='J_example'>");
if (hasCaption) {
arr.push("<caption>" + lang.captionName + "</caption>")
}
if (hasTitle) {
arr.push("<tr>");
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>"); }
for (var j = 0; j < 5; j++) {
arr.push("<th>" + lang.titleName + "</th>");
}
arr.push("</tr>");
}
for (var i = 0; i < 6; i++) {
arr.push("<tr>");
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>") }
for (var k = 0; k < 5; k++) {
arr.push("<td>" + lang.cellsName + "</td>")
}
arr.push("</tr>");
}
arr.push("</table>");
preview.innerHTML = arr.join("");
this.updateSortSpan();
},
titleHanler:function () {
var example = $G("J_example"),
frg=document.createDocumentFragment(),
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
colCount = example.rows[0].children.length;
if (title.checked) {
example.insertRow(0);
for (var i = 0, node; i < colCount; i++) {
node = document.createElement("th");
node.innerHTML = lang.titleName;
frg.appendChild(node);
}
example.rows[0].appendChild(frg);
} else {
domUtils.remove(example.rows[0]);
}
me.setColor(color);
me.updateSortSpan();
},
titleColHanler:function () {
var example = $G("J_example"),
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
colArr = example.rows,
colCount = colArr.length;
if (titleCol.checked) {
for (var i = 0, node; i < colCount; i++) {
node = document.createElement("th");
node.innerHTML = lang.titleName;
colArr[i].insertBefore(node, colArr[i].children[0]);
}
} else {
for (var i = 0; i < colCount; i++) {
domUtils.remove(colArr[i].children[0]);
}
}
me.setColor(color);
me.updateSortSpan();
},
captionHanler:function () {
var example = $G("J_example");
if (caption.checked) {
var row = document.createElement('caption');
row.innerHTML = lang.captionName;
example.insertBefore(row, example.firstChild);
} else {
domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]);
}
},
sorttableHanler:function(){
me.updateSortSpan();
},
autoSizeContentHanler:function () {
var example = $G("J_example");
example.removeAttribute("width");
},
autoSizePageHanler:function () {
var example = $G("J_example");
var tds = example.getElementsByTagName(example, "td");
utils.each(tds, function (td) {
td.removeAttribute("width");
});
example.setAttribute('width', '100%');
},
updateSortSpan: function(){
var example = $G("J_example"),
row = example.rows[0];
var spans = domUtils.getElementsByTagName(example,"span");
utils.each(spans,function(span){
span.parentNode.removeChild(span);
});
if (sorttable.checked) {
utils.each(row.cells, function(cell, i){
var span = document.createElement("span");
span.innerHTML = "^";
cell.appendChild(span);
});
}
},
getColor:function () {
var start = editor.selection.getStart(), color,
cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true);
color = cell && domUtils.getComputedStyle(cell, "border-color");
if (!color) color = "#DDDDDD";
return color;
},
setColor:function (color) {
var example = $G("J_example"),
arr = domUtils.getElementsByTagName(example, "td").concat(
domUtils.getElementsByTagName(example, "th"),
domUtils.getElementsByTagName(example, "caption")
);
tone.value = color;
utils.each(arr, function (node) {
node.style.borderColor = color;
});
},
setAutoSize:function () {
var me = this;
autoSizePage.checked = true;
me.autoSizePageHanler();
}
};
new editTable;
dialog.onok = function () {
editor.__hasEnterExecCommand = true;
var checks = {
title:"inserttitle deletetitle",
titleCol:"inserttitlecol deletetitlecol",
caption:"insertcaption deletecaption",
sorttable:"enablesort disablesort"
};
editor.fireEvent('saveScene');
for(var i in checks){
var cmds = checks[i].split(" "),
input = $G("J_" + i);
if(input["checked"]){
editor.queryCommandState(cmds[0])!=-1 &&editor.execCommand(cmds[0]);
}else{
editor.queryCommandState(cmds[1])!=-1 &&editor.execCommand(cmds[1]);
}
}
editor.execCommand("edittable", tone.value);
autoSizeContent.checked ?editor.execCommand('adaptbytext') : "";
autoSizePage.checked ? editor.execCommand("adaptbywindow") : "";
editor.fireEvent('saveScene');
editor.__hasEnterExecCommand = false;
};
})();
!function(){function e(){(r=this).init()}var r,l=$G("J_title"),d=$G("J_titleCol"),i=$G("J_caption"),a=$G("J_sorttable"),c=$G("J_autoSizeContent"),m=$G("J_autoSizePage"),s=$G("J_tone"),u=$G("J_preview");e.prototype={init:function(){var e=new UE.ui.ColorPicker({editor:editor}),t=new UE.ui.Popup({editor:editor,content:e});l.checked=-1==editor.queryCommandState("inserttitle"),d.checked=-1==editor.queryCommandState("inserttitlecol"),i.checked=-1==editor.queryCommandState("insertcaption"),a.checked=1==editor.queryCommandState("enablesort");var o=editor.queryCommandState("enablesort"),n=editor.queryCommandState("disablesort");a.checked=!!(o<0&&0<=n),a.disabled=!!(o<0&&n<0),a.title=o<0&&n<0?lang.errorMsg:"",r.createTable(l.checked,d.checked,i.checked),r.setAutoSize(),r.setColor(r.getColor()),domUtils.on(l,"click",r.titleHanler),domUtils.on(d,"click",r.titleColHanler),domUtils.on(i,"click",r.captionHanler),domUtils.on(a,"click",r.sorttableHanler),domUtils.on(c,"click",r.autoSizeContentHanler),domUtils.on(m,"click",r.autoSizePageHanler),domUtils.on(s,"click",function(){t.showAnchor(s)}),domUtils.on(document,"mousedown",function(){t.hide()}),e.addListener("pickcolor",function(){r.setColor(arguments[1]),t.hide()}),e.addListener("picknocolor",function(){r.setColor(""),t.hide()})},createTable:function(e,t,o){var n=[];if(n.push("<table id='J_example'>"),o&&n.push("<caption>"+lang.captionName+"</caption>"),e){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var i=0;i<5;i++)n.push("<th>"+lang.titleName+"</th>");n.push("</tr>")}for(var a=0;a<6;a++){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var r=0;r<5;r++)n.push("<td>"+lang.cellsName+"</td>");n.push("</tr>")}n.push("</table>"),u.innerHTML=n.join(""),this.updateSortSpan()},titleHanler:function(){var e=$G("J_example"),t=document.createDocumentFragment(),o=domUtils.getComputedStyle(domUtils.getElementsByTagName(e,"td")[0],"border-color"),n=e.rows[0].children.length;if(l.checked){e.insertRow(0);for(var i,a=0;a<n;a++)(i=document.createElement("th")).innerHTML=lang.titleName,t.appendChild(i);e.rows[0].appendChild(t)}else domUtils.remove(e.rows[0]);r.setColor(o),r.updateSortSpan()},titleColHanler:function(){var e=$G("J_example"),t=domUtils.getComputedStyle(domUtils.getElementsByTagName(e,"td")[0],"border-color"),o=e.rows,n=o.length;if(d.checked)for(var i,a=0;a<n;a++)(i=document.createElement("th")).innerHTML=lang.titleName,o[a].insertBefore(i,o[a].children[0]);else for(a=0;a<n;a++)domUtils.remove(o[a].children[0]);r.setColor(t),r.updateSortSpan()},captionHanler:function(){var e=$G("J_example");if(i.checked){var t=document.createElement("caption");t.innerHTML=lang.captionName,e.insertBefore(t,e.firstChild)}else domUtils.remove(domUtils.getElementsByTagName(e,"caption")[0])},sorttableHanler:function(){r.updateSortSpan()},autoSizeContentHanler:function(){$G("J_example").removeAttribute("width")},autoSizePageHanler:function(){var e=$G("J_example"),t=e.getElementsByTagName(e,"td");utils.each(t,function(e){e.removeAttribute("width")}),e.setAttribute("width","100%")},updateSortSpan:function(){var e=$G("J_example"),t=e.rows[0],o=domUtils.getElementsByTagName(e,"span");utils.each(o,function(e){e.parentNode.removeChild(e)}),a.checked&&utils.each(t.cells,function(e,t){var o=document.createElement("span");o.innerHTML="^",e.appendChild(o)})},getColor:function(){var e=editor.selection.getStart(),t=domUtils.findParentByTagName(e,["td","th","caption"],!0);return t&&domUtils.getComputedStyle(t,"border-color")||"#DDDDDD"},setColor:function(t){var e=$G("J_example"),o=domUtils.getElementsByTagName(e,"td").concat(domUtils.getElementsByTagName(e,"th"),domUtils.getElementsByTagName(e,"caption"));s.value=t,utils.each(o,function(e){e.style.borderColor=t})},setAutoSize:function(){m.checked=!0,this.autoSizePageHanler()}},new e,dialog.onok=function(){editor.__hasEnterExecCommand=!0;var e={title:"inserttitle deletetitle",titleCol:"inserttitlecol deletetitlecol",caption:"insertcaption deletecaption",sorttable:"enablesort disablesort"};for(var t in editor.fireEvent("saveScene"),e){var o=e[t].split(" ");$G("J_"+t).checked?-1!=editor.queryCommandState(o[0])&&editor.execCommand(o[0]):-1!=editor.queryCommandState(o[1])&&editor.execCommand(o[1])}editor.execCommand("edittable",s.value),c.checked&&editor.execCommand("adaptbytext"),m.checked&&editor.execCommand("adaptbywindow"),editor.fireEvent("saveScene"),editor.__hasEnterExecCommand=!1}}();

View File

@ -1,74 +1 @@
UE.registerUI('kityformula', function(editor, uiname){
// 创建dialog
var kfDialog = new UE.ui.Dialog({
// 指定弹出层路径
iframeUrl: editor.options.UEDITOR_HOME_URL + 'kityformula-plugin/kityFormulaDialog.html',
// 编辑器实例
editor: editor,
// dialog 名称
name: uiname,
// dialog 标题
title: '插入公式 ',
// dialog 外围 css
cssRules: 'width:783px; height: 386px;',
//如果给出了buttons就代表dialog有确定和取消
buttons:[
{
className:'edui-okbutton',
label:'确定',
onclick:function () {
kfDialog.close(true);
}
},
{
className:'edui-cancelbutton',
label:'取消',
onclick:function () {
kfDialog.close(false);
}
}
]});
editor.ready(function(){
UE.utils.cssRule('kfformula', 'img.kfformula{vertical-align: middle;}', editor.document);
});
var iconUrl = editor.options.UEDITOR_HOME_URL + 'kityformula-plugin/kf-icon.png';
var tmpLink = document.createElement('a');
tmpLink.href = iconUrl;
tmpLink.href = tmpLink.href;
iconUrl = tmpLink.href;
var kfBtn = new UE.ui.Button({
name:'插入' + uiname,
title:'插入公式',
//需要添加的额外样式指定icon图标
cssRules :'background: url("' + iconUrl + '") !important',
onclick:function () {
//渲染dialog
kfDialog.render();
kfDialog.open();
}
});
//当点到编辑内容上时按钮要做的状态反射
editor.addListener('selectionchange', function () {
var state = editor.queryCommandState(uiname);
if (state == -1) {
kfBtn.setDisabled(true);
kfBtn.setChecked(false);
} else {
kfBtn.setDisabled(false);
kfBtn.setChecked(state);
}
});
return kfBtn;
});
UE.registerUI("kityformula",function(t,n){var e=new UE.ui.Dialog({iframeUrl:t.options.UEDITOR_HOME_URL+"kityformula-plugin/kityFormulaDialog.html",editor:t,name:n,title:"插入公式 ",cssRules:"width:783px; height: 386px;",buttons:[{className:"edui-okbutton",label:"确定",onclick:function(){e.close(!0)}},{className:"edui-cancelbutton",label:"取消",onclick:function(){e.close(!1)}}]});t.ready(function(){UE.utils.cssRule("kfformula","img.kfformula{vertical-align: middle;}",t.document)});var i=t.options.UEDITOR_HOME_URL+"kityformula-plugin/kf-icon.png",l=document.createElement("a");l.href=i,l.href=l.href,i=l.href;var o=new UE.ui.Button({name:"插入"+n,title:"插入公式",cssRules:'background: url("'+i+'") !important',onclick:function(){e.render(),e.open()}});return t.addListener("selectionchange",function(){var e=t.queryCommandState(n);-1==e?(o.setDisabled(!0),o.setChecked(!1)):(o.setDisabled(!1),o.setChecked(e))}),o});

View File

@ -1,247 +1 @@
///import core
///plugin 编辑器默认的过滤转换机制
UE.plugins['defaultfilter'] = function () {
var me = this;
me.setOpt({
'allowDivTransToP':true,
'disabledTableInTable':true,
'rgb2Hex':true
});
//默认的过滤处理
//进入编辑器的内容处理
me.addInputRule(function (root) {
var allowDivTransToP = this.options.allowDivTransToP;
var val;
function tdParent(node){
while(node && node.type == 'element'){
if(node.tagName == 'td'){
return true;
}
node = node.parentNode;
}
return false;
}
//进行默认的处理
root.traversal(function (node) {
if (node.type == 'element') {
if (!UE.dom.dtd.$cdata[node.tagName] && me.options.autoClearEmptyNode && UE.dom.dtd.$inline[node.tagName] && !UE.dom.dtd.$empty[node.tagName] && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
if (!node.firstChild()) node.parentNode.removeChild(node);
else if (node.tagName == 'span' && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
node.parentNode.removeChild(node, true)
}
return;
}
switch (node.tagName) {
case 'style':
case 'script':
node.setAttr({
cdata_tag: node.tagName,
cdata_data: (node.innerHTML() || ''),
'_ue_custom_node_':'true'
});
node.tagName = 'div';
node.innerHTML('');
break;
case 'a':
if (val = node.getAttr('href')) {
node.setAttr('_href', val)
}
break;
case 'img':
//todo base64暂时去掉后边做远程图片上传后干掉这个
// if (val = node.getAttr('src')) {
// if (/^data:/.test(val)) {
// node.parentNode.removeChild(node);
// break;
// }
// }
node.setAttr('_src', node.getAttr('src'));
break;
case 'span':
if (UE.browser.webkit && (val = node.getStyle('white-space'))) {
if (/nowrap|normal/.test(val)) {
node.setStyle('white-space', '');
if (me.options.autoClearEmptyNode && UE.utils.isEmptyObject(node.attrs)) {
node.parentNode.removeChild(node, true)
}
}
}
val = node.getAttr('id');
if(val && /^_baidu_bookmark_/i.test(val)){
node.parentNode.removeChild(node)
}
break;
case 'p':
if (val = node.getAttr('align')) {
node.setAttr('align');
node.setStyle('text-align', val)
}
//trace:3431
// var cssStyle = node.getAttr('style');
// if (cssStyle) {
// cssStyle = cssStyle.replace(/(margin|padding)[^;]+/g, '');
// node.setAttr('style', cssStyle)
//
// }
//p标签不允许嵌套
UE.utils.each(node.children,function(n){
if(n.type == 'element' && n.tagName == 'p'){
var next = n.nextSibling();
node.parentNode.insertAfter(n,node);
var last = n;
while(next){
var tmp = next.nextSibling();
node.parentNode.insertAfter(next,last);
last = next;
next = tmp;
}
return false;
}
});
if (!node.firstChild()) {
node.innerHTML(UE.browser.ie ? '&nbsp;' : '<br/>')
}
break;
case 'div':
if(node.getAttr('cdata_tag')){
break;
}
//针对代码这里不处理插入代码的div
val = node.getAttr('class');
if(val && /^line number\d+/.test(val)){
break;
}
if(!allowDivTransToP){
break;
}
var tmpNode, p = UE.uNode.createElement('p');
while (tmpNode = node.firstChild()) {
if (tmpNode.type == 'text' || !UE.dom.UE.dom.dtd.$block[tmpNode.tagName]) {
p.appendChild(tmpNode);
} else {
if (p.firstChild()) {
node.parentNode.insertBefore(p, node);
p = UE.uNode.createElement('p');
} else {
node.parentNode.insertBefore(tmpNode, node);
}
}
}
if (p.firstChild()) {
node.parentNode.insertBefore(p, node);
}
node.parentNode.removeChild(node);
break;
case 'dl':
node.tagName = 'ul';
break;
case 'dt':
case 'dd':
node.tagName = 'li';
break;
case 'li':
var className = node.getAttr('class');
if (!className || !/list\-/.test(className)) {
node.setAttr()
}
var tmpNodes = node.getNodesByTagName('ol ul');
UE.utils.each(tmpNodes, function (n) {
node.parentNode.insertAfter(n, node);
});
break;
case 'td':
case 'th':
case 'caption':
if(!node.children || !node.children.length){
node.appendChild(UE.browser.ie11below ? UE.uNode.createText(' ') : UE.uNode.createElement('br'))
}
break;
case 'table':
if(me.options.disabledTableInTable && tdParent(node)){
node.parentNode.insertBefore(UE.uNode.createText(node.innerText()),node);
node.parentNode.removeChild(node)
}
}
}
// if(node.type == 'comment'){
// node.parentNode.removeChild(node);
// }
})
});
//从编辑器出去的内容处理
me.addOutputRule(function (root) {
var val;
root.traversal(function (node) {
if (node.type == 'element') {
if (me.options.autoClearEmptyNode && UE.dom.dtd.$inline[node.tagName] && !UE.dom.dtd.$empty[node.tagName] && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
if (!node.firstChild()) node.parentNode.removeChild(node);
else if (node.tagName == 'span' && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
node.parentNode.removeChild(node, true)
}
return;
}
switch (node.tagName) {
case 'div':
if (val = node.getAttr('cdata_tag')) {
node.tagName = val;
node.appendChild(UE.uNode.createText(node.getAttr('cdata_data')));
node.setAttr({cdata_tag: '', cdata_data: '','_ue_custom_node_':''});
}
break;
case 'a':
if (val = node.getAttr('_href')) {
node.setAttr({
'href': UE.utils.html(val),
'_href': ''
})
}
break;
break;
case 'span':
val = node.getAttr('id');
if(val && /^_baidu_bookmark_/i.test(val)){
node.parentNode.removeChild(node)
}
//将color的rgb格式转换为#16进制格式
if(me.getOpt('rgb2Hex')){
var cssStyle = node.getAttr('style');
if(cssStyle){
node.setAttr('style',cssStyle.replace(/rgba?\(([\d,\s]+)\)/g,function(a,value){
var array = value.split(",");
if (array.length > 3)
return "";
value = "#";
for (var i = 0, color; color = array[i++];) {
color = parseInt(color.replace(/[^\d]/gi, ''), 10).toString(16);
value += color.length == 1 ? "0" + color : color;
}
return value.toUpperCase();
}))
}
}
break;
case 'img':
if (val = node.getAttr('_src')) {
node.setAttr({
'src': node.getAttr('_src'),
'_src': ''
})
}
}
}
})
});
};
UE.plugins.defaultfilter=function(){var n=this;n.setOpt({allowDivTransToP:!0,disabledTableInTable:!0,rgb2Hex:!0}),n.addInputRule(function(e){var s,d=this.options.allowDivTransToP;e.traversal(function(i){if("element"==i.type){if(!UE.dom.dtd.$cdata[i.tagName]&&n.options.autoClearEmptyNode&&UE.dom.dtd.$inline[i.tagName]&&!UE.dom.dtd.$empty[i.tagName]&&(!i.attrs||UE.utils.isEmptyObject(i.attrs)))return void(i.firstChild()?"span"!=i.tagName||i.attrs&&!UE.utils.isEmptyObject(i.attrs)||i.parentNode.removeChild(i,!0):i.parentNode.removeChild(i));switch(i.tagName){case"style":case"script":i.setAttr({cdata_tag:i.tagName,cdata_data:i.innerHTML()||"",_ue_custom_node_:"true"}),i.tagName="div",i.innerHTML("");break;case"a":(s=i.getAttr("href"))&&i.setAttr("_href",s);break;case"img":i.setAttr("_src",i.getAttr("src"));break;case"span":UE.browser.webkit&&(s=i.getStyle("white-space"))&&/nowrap|normal/.test(s)&&(i.setStyle("white-space",""),n.options.autoClearEmptyNode&&UE.utils.isEmptyObject(i.attrs)&&i.parentNode.removeChild(i,!0)),(s=i.getAttr("id"))&&/^_baidu_bookmark_/i.test(s)&&i.parentNode.removeChild(i);break;case"p":(s=i.getAttr("align"))&&(i.setAttr("align"),i.setStyle("text-align",s)),UE.utils.each(i.children,function(e){if("element"==e.type&&"p"==e.tagName){var t=e.nextSibling();i.parentNode.insertAfter(e,i);for(var a=e;t;){var r=t.nextSibling();i.parentNode.insertAfter(t,a),a=t,t=r}return!1}}),i.firstChild()||i.innerHTML(UE.browser.ie?"&nbsp;":"<br/>");break;case"div":if(i.getAttr("cdata_tag"))break;if((s=i.getAttr("class"))&&/^line number\d+/.test(s))break;if(!d)break;for(var e,t=UE.uNode.createElement("p");e=i.firstChild();)"text"!=e.type&&UE.dom.UE.dom.dtd.$block[e.tagName]?t.firstChild()?(i.parentNode.insertBefore(t,i),t=UE.uNode.createElement("p")):i.parentNode.insertBefore(e,i):t.appendChild(e);t.firstChild()&&i.parentNode.insertBefore(t,i),i.parentNode.removeChild(i);break;case"dl":i.tagName="ul";break;case"dt":case"dd":i.tagName="li";break;case"li":var a=i.getAttr("class");a&&/list\-/.test(a)||i.setAttr();var r=i.getNodesByTagName("ol ul");UE.utils.each(r,function(e){i.parentNode.insertAfter(e,i)});break;case"td":case"th":case"caption":i.children&&i.children.length||i.appendChild(UE.browser.ie11below?UE.uNode.createText(" "):UE.uNode.createElement("br"));break;case"table":n.options.disabledTableInTable&&function(e){for(;e&&"element"==e.type;){if("td"==e.tagName)return 1;e=e.parentNode}}(i)&&(i.parentNode.insertBefore(UE.uNode.createText(i.innerText()),i),i.parentNode.removeChild(i))}}})}),n.addOutputRule(function(e){var a;e.traversal(function(e){if("element"==e.type){if(n.options.autoClearEmptyNode&&UE.dom.dtd.$inline[e.tagName]&&!UE.dom.dtd.$empty[e.tagName]&&(!e.attrs||UE.utils.isEmptyObject(e.attrs)))return void(e.firstChild()?"span"!=e.tagName||e.attrs&&!UE.utils.isEmptyObject(e.attrs)||e.parentNode.removeChild(e,!0):e.parentNode.removeChild(e));switch(e.tagName){case"div":(a=e.getAttr("cdata_tag"))&&(e.tagName=a,e.appendChild(UE.uNode.createText(e.getAttr("cdata_data"))),e.setAttr({cdata_tag:"",cdata_data:"",_ue_custom_node_:""}));break;case"a":(a=e.getAttr("_href"))&&e.setAttr({href:UE.utils.html(a),_href:""});break;case"span":if((a=e.getAttr("id"))&&/^_baidu_bookmark_/i.test(a)&&e.parentNode.removeChild(e),n.getOpt("rgb2Hex")){var t=e.getAttr("style");t&&e.setAttr("style",t.replace(/rgba?\(([\d,\s]+)\)/g,function(e,t){var a=t.split(",");if(3<a.length)return"";t="#";for(var r,i=0;r=a[i++];)t+=1==(r=parseInt(r.replace(/[^\d]/gi,""),10).toString(16)).length?"0"+r:r;return t.toUpperCase()}))}break;case"img":(a=e.getAttr("_src"))&&e.setAttr({src:e.getAttr("_src"),_src:""})}}})})};

View File

@ -1,66 +1 @@
/**
* Created by zhangbo21 on 14-9-2.
*/
/*
* getKfContent : 将image的src从base64替换为文件名
* param : callback -- 回调函数 其参数为替换之后的内容
* return : void
* */
UE.Editor.prototype.getKfContent = function(callback){
var me = this;
var actionUrl = me.getActionUrl(me.getOpt('scrawlActionName')),
params = UE.utils.serializeParam(me.queryCommandValue('serverparam')) || '',
url = UE.utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params);
// 找到所有的base64
var count = 0;
var imgs =me.body.getElementsByTagName('img');
var base64Imgs = [];
UE.utils.each(imgs, function(item){
var imgType = item.getAttribute('src').match(/^[^;]+/)[0];
if ( imgType === 'data:image/png') {
base64Imgs.push(item);
}
});
if (base64Imgs.length == 0){
execCallback();
} else {
UE.utils.each(base64Imgs, function(item){
var opt ={};
opt[me.getOpt('scrawlFieldName')]= item.getAttribute('src').replace(/^[^,]+,/, '');
opt.onsuccess = function(xhr){
var json = UE.utils.str2json(xhr.responseText),
url = me.options.scrawlUrlPrefix + json.url;
item.setAttribute('src', url);
item.setAttribute('_src', url);
count++;
execCallback();
}
opt.onerror = function(err){
console.error(err);
count++;
execCallback();
}
UE.ajax.request(url, opt);
});
}
function execCallback(){
if (count >= base64Imgs.length) {
me.sync();
callback(me.getContent());
}
}
};
UE.Editor.prototype.getKfContent=function(t){var s=this,e=s.getActionUrl(s.getOpt("scrawlActionName")),r=UE.utils.serializeParam(s.queryCommandValue("serverparam"))||"",a=UE.utils.formatUrl(e+(-1==e.indexOf("?")?"?":"&")+r),i=0,n=s.body.getElementsByTagName("img"),o=[];function c(){i>=o.length&&(s.sync(),t(s.getContent()))}UE.utils.each(n,function(t){"data:image/png"===t.getAttribute("src").match(/^[^;]+/)[0]&&o.push(t)}),0==o.length?c():UE.utils.each(o,function(n){var t={};t[s.getOpt("scrawlFieldName")]=n.getAttribute("src").replace(/^[^,]+,/,""),t.onsuccess=function(t){var e=UE.utils.str2json(t.responseText),r=s.options.scrawlUrlPrefix+e.url;n.setAttribute("src",r),n.setAttribute("_src",r),i++,c()},t.onerror=function(t){console.error(t),i++,c()},UE.ajax.request(a,t)})};

View File

@ -1,40 +1 @@
.kf-editor {
width: 100%;
height: 100%;
border: 1px solid #e0e0e0;
position: relative;
top: 0;
left: 0;
overflow: hidden;
z-index: 2;
background-color: #f6f5ee;
}
.kf-editor-edit-area {
position: relative;
top: 0;
left: 0;
z-index: 1;
height: 0;
background-color: white;
/*background-color: white;*/
/*background-size: 21px 21px;*/
/*background-position: 0 0,10px 10px;*/
/*background-image: -webkit-linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef),-webkit-linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef);*/
/*background-image: linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef),linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef);*/
}
.kf-editor-canvas-container {
width: 100%;
height: 100%;
}
.kf-editor-input-box {
position: fixed;
top: 0;
left: -99999999px;
z-index: 999999;
}
.kf-editor{width:100%;height:100%;border:1px solid #e0e0e0;position:relative;top:0;left:0;overflow:hidden;z-index:2;background-color:#f6f5ee}.kf-editor-edit-area{position:relative;top:0;left:0;z-index:1;height:0;background-color:white}.kf-editor-canvas-container{width:100%;height:100%}.kf-editor-input-box{position:fixed;top:0;left:-99999999px;z-index:999999}

View File

@ -1,12 +1 @@
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
background: rgba( 48, 48, 48, 0.5 );
}
body {
height: 1000px;
}
html,body{width:100%;height:100%;padding:0;margin:0;background:rgba(48,48,48,0.5)}body{height:1000px}

View File

@ -1,78 +1,3 @@
/*!
* 滚动条
**/
.kf-editor-edit-scrollbar {
width: 100%;
height: 16px;
position: absolute;
bottom: 0;
left: 0;
z-index: 994;
border-top: 1px solid #ddd;
}
.kf-editor-ui-left-button {
position: absolute;
top: 0;
left: 0;
width: 5px;
height: 100%;
background: white;
}
.kf-editor-ui-right-button {
position: absolute;
top: 0;
right: 0;
width: 5px;
height: 100%;
background: white;
}
.kf-editor-ui-track {
position: absolute;
top: 0;
left: 5px;
width: 0;
height: 100%;
background-image: url(../images/scrollbar/edit/bar-left.png), url(../images/scrollbar/edit/bar-right.png), url(../images/scrollbar/edit/bar-bg.png);
background-repeat: no-repeat, no-repeat, repeat-x;
background-position: 0 0, right 0, 0 0;
}
.kf-editor-ui-thumb {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
}
.kf-editor-ui-thumb-left {
width: 5px;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: url(../images/scrollbar/edit/thumb-left.png) no-repeat 0 0;
z-index: 1;
}
.kf-editor-ui-thumb-right {
width: 5px;
height: 100%;
position: absolute;
top: 0;
right: 0;
background: url(../images/scrollbar/edit/thumb-right.png) no-repeat 0 0;
}
.kf-editor-ui-thumb-body {
position: absolute;
top: 0;
left: 5px;
width: 0;
height: 100%;
background: url(../images/scrollbar/edit/thumb-bg.png) repeat-x 0 0;
}
**/.kf-editor-edit-scrollbar{width:100%;height:16px;position:absolute;bottom:0;left:0;z-index:994;border-top:1px solid #ddd}.kf-editor-ui-left-button{position:absolute;top:0;left:0;width:5px;height:100%;background:white}.kf-editor-ui-right-button{position:absolute;top:0;right:0;width:5px;height:100%;background:white}.kf-editor-ui-track{position:absolute;top:0;left:5px;width:0;height:100%;background-image:url(../images/scrollbar/edit/bar-left.png),url(../images/scrollbar/edit/bar-right.png),url(../images/scrollbar/edit/bar-bg.png);background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 0,right 0,0 0}.kf-editor-ui-thumb{position:absolute;top:0;left:0;width:0;height:100%}.kf-editor-ui-thumb-left{width:5px;height:100%;position:absolute;top:0;left:0;background:url(../images/scrollbar/edit/thumb-left.png) no-repeat 0 0;z-index:1}.kf-editor-ui-thumb-right{width:5px;height:100%;position:absolute;top:0;right:0;background:url(../images/scrollbar/edit/thumb-right.png) no-repeat 0 0}.kf-editor-ui-thumb-body{position:absolute;top:0;left:5px;width:0;height:100%;background:url(../images/scrollbar/edit/thumb-bg.png) repeat-x 0 0}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,100 +1 @@
/*弹出对话框页面样式组件
*/
/*reset
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
outline: 0;
font-size: 100%;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*module
*/
body {
background-color: #fff;
font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA;
color: #646464;
}
/*tab*/
.tabhead {
position: relative;
z-index: 10;
}
.tabhead span {
display: inline-block;
padding: 0 5px;
height: 30px;
border: 1px solid #ccc;
background: url("images/dialog-title-bg.png") repeat-x;
text-align: center;
line-height: 30px;
cursor: pointer;
*margin-right: 5px;
}
.tabhead span.focus {
height: 31px;
border-bottom: none;
background: #fff;
}
.tabbody {
position: relative;
top: -1px;
margin: 0 auto;
border: 1px solid #ccc;
}
/*button*/
a.button {
display: block;
text-align: center;
line-height: 24px;
text-decoration: none;
height: 24px;
width: 95px;
border: 0;
color: #838383;
background: url(../../themes/default/images/icons-all.gif) no-repeat;
}
a.button:hover {
background-position: 0 -30px;
}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;outline:0;font-size:100%}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;font:12px/1.5 sans-serif,"宋体","Arial Narrow",HELVETICA;color:#646464}.tabhead{position:relative;z-index:10}.tabhead span{display:inline-block;padding:0 5px;height:30px;border:1px solid #ccc;background:url("images/dialog-title-bg.png") repeat-x;text-align:center;line-height:30px;cursor:pointer;*margin-right:5px}.tabhead span.focus{height:31px;border-bottom:0;background:#fff}.tabbody{position:relative;top:-1px;margin:0 auto;border:1px solid #ccc}a.button{display:block;text-align:center;line-height:24px;text-decoration:none;height:24px;width:95px;border:0;color:#838383;background:url(../../themes/default/images/icons-all.gif) no-repeat}a.button:hover{background-position:0 -30px}

View File

@ -1,7 +1 @@
/*可以在这里添加你自己的css*/
.gapfilling-span{
color: red;
padding: 0px 30px;
margin: 0px 5px;
border-bottom:3px double red;
}
.gapfilling-span{color:red;padding:0 30px;margin:0 5px;border-bottom:3px double red}

View File

@ -1,104 +1 @@
.CodeMirror {
line-height: 1em;
font-family: monospace;
}
.CodeMirror-scroll {
overflow: auto;
height: 300px;
/* This is needed to prevent an IE[67] bug where the scrolled content
is visible outside of the scrolling box. */
position: relative;
}
.CodeMirror-gutter {
position: absolute; left: 0; top: 0;
z-index: 10;
background-color: #f7f7f7;
border-right: 1px solid #eee;
min-width: 2em;
height: 100%;
}
.CodeMirror-gutter-text {
color: #aaa;
text-align: right;
padding: .4em .2em .4em .4em;
white-space: pre !important;
}
.CodeMirror-lines {
padding: .4em;
}
.CodeMirror pre {
-moz-border-radius: 0;
-webkit-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
border-width: 0; margin: 0; padding: 0; background: transparent;
font-family: inherit;
font-size: inherit;
padding: 0; margin: 0;
white-space: pre;
word-wrap: normal;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
}
.CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden;
}
.CodeMirror textarea {
outline: none !important;
}
.CodeMirror pre.CodeMirror-cursor {
z-index: 10;
position: absolute;
visibility: hidden;
border-left: 1px solid black;
}
.CodeMirror-focused pre.CodeMirror-cursor {
visibility: visible;
}
span.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused span.CodeMirror-selected { background: #d2dcf8; }
.CodeMirror-searching {background: #ffa;}
/* Default theme */
.cm-s-default span.cm-keyword {color: #708;}
.cm-s-default span.cm-atom {color: #219;}
.cm-s-default span.cm-number {color: #164;}
.cm-s-default span.cm-def {color: #00f;}
.cm-s-default span.cm-variable {color: black;}
.cm-s-default span.cm-variable-2 {color: #05a;}
.cm-s-default span.cm-variable-3 {color: #085;}
.cm-s-default span.cm-property {color: black;}
.cm-s-default span.cm-operator {color: black;}
.cm-s-default span.cm-comment {color: #a50;}
.cm-s-default span.cm-string {color: #a11;}
.cm-s-default span.cm-string-2 {color: #f50;}
.cm-s-default span.cm-meta {color: #555;}
.cm-s-default span.cm-error {color: #f00;}
.cm-s-default span.cm-qualifier {color: #555;}
.cm-s-default span.cm-builtin {color: #30a;}
.cm-s-default span.cm-bracket {color: #cc7;}
.cm-s-default span.cm-tag {color: #170;}
.cm-s-default span.cm-attribute {color: #00c;}
.cm-s-default span.cm-header {color: #a0a;}
.cm-s-default span.cm-quote {color: #090;}
.cm-s-default span.cm-hr {color: #999;}
.cm-s-default span.cm-link {color: #00c;}
span.cm-header, span.cm-strong {font-weight: bold;}
span.cm-em {font-style: italic;}
span.cm-emstrong {font-style: italic; font-weight: bold;}
span.cm-link {text-decoration: underline;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror{line-height:1em;font-family:monospace}.CodeMirror-scroll{overflow:auto;height:300px;position:relative}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:#f7f7f7;border-right:1px solid #eee;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre !important}.CodeMirror-lines{padding:.4em}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:none !important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}span.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused span.CodeMirror-selected{background:#d2dcf8}.CodeMirror-searching{background:#ffa}.cm-s-default span.cm-keyword{color:#708}.cm-s-default span.cm-atom{color:#219}.cm-s-default span.cm-number{color:#164}.cm-s-default span.cm-def{color:#00f}.cm-s-default span.cm-variable{color:black}.cm-s-default span.cm-variable-2{color:#05a}.cm-s-default span.cm-variable-3{color:#085}.cm-s-default span.cm-property{color:black}.cm-s-default span.cm-operator{color:black}.cm-s-default span.cm-comment{color:#a50}.cm-s-default span.cm-string{color:#a11}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{color:red}.cm-s-default span.cm-qualifier{color:#555}.cm-s-default span.cm-builtin{color:#30a}.cm-s-default span.cm-bracket{color:#cc7}.cm-s-default span.cm-tag{color:#170}.cm-s-default span.cm-attribute{color:#00c}.cm-s-default span.cm-header{color:#a0a}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#00c}span.cm-header,span.cm-strong{font-weight:bold}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:bold}span.cm-link{text-decoration:underline}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,28 +1 @@
.webuploader-container {
position: relative;
}
.webuploader-element-invisible {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px,1px,1px,1px);
}
.webuploader-pick {
position: relative;
display: inline-block;
cursor: pointer;
background: #00b7ee;
padding: 10px 15px;
color: #fff;
text-align: center;
border-radius: 3px;
overflow: hidden;
}
.webuploader-pick-hover {
background: #00a2d4;
}
.webuploader-pick-disable {
opacity: 0.6;
pointer-events:none;
}
.webuploader-container{position:relative}.webuploader-element-invisible{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.webuploader-pick{position:relative;display:inline-block;cursor:pointer;background:#00b7ee;padding:10px 15px;color:#fff;text-align:center;border-radius:3px;overflow:hidden}.webuploader-pick-hover{background:#00a2d4}.webuploader-pick-disable{opacity:.6;pointer-events:none}

View File

@ -7,10 +7,10 @@
margin: 0;
height:100%;
width: 100%;
}</style><script src=./admin/components/echarts/echarts.min.js></script><script src=./admin/components/echarts/theme/macarons.js></script><script src="./admin/components/ueditor/ueditor.config.min.js?v=3"></script><script src="./admin/components/ueditor/ueditor.all.min.js?v=3"></script><script src=./admin/components/ueditor/lang/zh-cn/zh-cn.js></script><script src=./admin/components/ueditor/kityformula-plugin/addKityFormulaDialog.js></script><script src=./admin/components/ueditor/kityformula-plugin/getKfContent.js></script><script src=./admin/components/ueditor/kityformula-plugin/defaultFilterFix.js></script><script>var _hmt = _hmt || [];
}</style><script src=./admin/components/echarts/echarts.min.js></script><script src=./admin/components/echarts/theme/macarons.js></script><script src="./admin/components/ueditor/ueditor.config.js?v=3"></script><script src="./admin/components/ueditor/ueditor.all.js?v=3"></script><script src=./admin/components/ueditor/lang/zh-cn/zh-cn.js></script><script src=./admin/components/ueditor/kityformula-plugin/addKityFormulaDialog.js></script><script src=./admin/components/ueditor/kityformula-plugin/getKfContent.js></script><script src=./admin/components/ueditor/kityformula-plugin/defaultFilterFix.js></script><script>var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?cd8218cd51f800ed2b73e5751cb3f4f9'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()</script><link href=static/css/chunk-04b6c2be.b6b9412a.css rel=prefetch><link href=static/css/chunk-07d991b3.b6b9412a.css rel=prefetch><link href=static/css/chunk-1159e38a.a13e9690.css rel=prefetch><link href=static/css/chunk-37f7a892.b6b9412a.css rel=prefetch><link href=static/css/chunk-4472f2d7.6aadbd54.css rel=prefetch><link href=static/css/chunk-448755e2.b6b9412a.css rel=prefetch><link href=static/css/chunk-4cf8ab8c.b6b9412a.css rel=prefetch><link href=static/css/chunk-5025ea04.b6b9412a.css rel=prefetch><link href=static/css/chunk-50ecaaf8.138abdf9.css rel=prefetch><link href=static/css/chunk-63af86fe.b6b9412a.css rel=prefetch><link href=static/css/chunk-6e3b3ca0.60f7ef12.css rel=prefetch><link href=static/css/chunk-913f50a6.b6b9412a.css rel=prefetch><link href=static/css/chunk-c2aa2eac.b6b9412a.css rel=prefetch><link href=static/css/chunk-c7b9eaf2.03972c94.css rel=prefetch><link href=static/js/chunk-04b6c2be.19a3c3f3.js rel=prefetch><link href=static/js/chunk-07d991b3.9ba5f9c3.js rel=prefetch><link href=static/js/chunk-1159e38a.76ea7844.js rel=prefetch><link href=static/js/chunk-16f9edc1.85b8543b.js rel=prefetch><link href=static/js/chunk-2d0c138b.d5e7a5ff.js rel=prefetch><link href=static/js/chunk-2d221bd2.9429819f.js rel=prefetch><link href=static/js/chunk-2d2300ef.152ad47e.js rel=prefetch><link href=static/js/chunk-2d230fe7.9061c75b.js rel=prefetch><link href=static/js/chunk-37f7a892.95be9ad9.js rel=prefetch><link href=static/js/chunk-4472f2d7.6d260979.js rel=prefetch><link href=static/js/chunk-448755e2.ac0363b8.js rel=prefetch><link href=static/js/chunk-4cf8ab8c.8713db3a.js rel=prefetch><link href=static/js/chunk-5025ea04.67e49172.js rel=prefetch><link href=static/js/chunk-50ecaaf8.62e34f1f.js rel=prefetch><link href=static/js/chunk-63af86fe.acec12e0.js rel=prefetch><link href=static/js/chunk-6e3b3ca0.51a7906a.js rel=prefetch><link href=static/js/chunk-733c35b2.f3692024.js rel=prefetch><link href=static/js/chunk-75f11c77.748823eb.js rel=prefetch><link href=static/js/chunk-78234ca2.9556cbc0.js rel=prefetch><link href=static/js/chunk-793f0082.72e9a3f4.js rel=prefetch><link href=static/js/chunk-913f50a6.edcd6d0c.js rel=prefetch><link href=static/js/chunk-c2aa2eac.1a7ac2a4.js rel=prefetch><link href=static/js/chunk-c7b9eaf2.60ca3466.js rel=prefetch><link href=static/js/chunk-d0753fda.4f8d316e.js rel=prefetch><link href=static/css/chunk-vendors.ee57d822.css rel=preload as=style><link href=static/css/index.7c5e9dfa.css rel=preload as=style><link href=static/js/chunk-vendors.4c3b0ead.js rel=preload as=script><link href=static/js/index.0cace378.js rel=preload as=script><link href=static/css/chunk-vendors.ee57d822.css rel=stylesheet><link href=static/css/index.7c5e9dfa.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=static/js/chunk-vendors.4c3b0ead.js></script><script src=static/js/index.0cace378.js></script></body></html>
})()</script><link href=static/css/chunk-04b6c2be.b6b9412a.css rel=prefetch><link href=static/css/chunk-07d991b3.b6b9412a.css rel=prefetch><link href=static/css/chunk-1159e38a.a13e9690.css rel=prefetch><link href=static/css/chunk-37f7a892.b6b9412a.css rel=prefetch><link href=static/css/chunk-4472f2d7.6aadbd54.css rel=prefetch><link href=static/css/chunk-448755e2.b6b9412a.css rel=prefetch><link href=static/css/chunk-4cf8ab8c.b6b9412a.css rel=prefetch><link href=static/css/chunk-5025ea04.b6b9412a.css rel=prefetch><link href=static/css/chunk-50ecaaf8.138abdf9.css rel=prefetch><link href=static/css/chunk-63af86fe.b6b9412a.css rel=prefetch><link href=static/css/chunk-6e3b3ca0.60f7ef12.css rel=prefetch><link href=static/css/chunk-913f50a6.b6b9412a.css rel=prefetch><link href=static/css/chunk-c2aa2eac.b6b9412a.css rel=prefetch><link href=static/css/chunk-c7b9eaf2.03972c94.css rel=prefetch><link href=static/js/chunk-04b6c2be.19a3c3f3.js rel=prefetch><link href=static/js/chunk-07d991b3.9ba5f9c3.js rel=prefetch><link href=static/js/chunk-1159e38a.76ea7844.js rel=prefetch><link href=static/js/chunk-16f9edc1.85b8543b.js rel=prefetch><link href=static/js/chunk-2d0c138b.d5e7a5ff.js rel=prefetch><link href=static/js/chunk-2d221bd2.9429819f.js rel=prefetch><link href=static/js/chunk-2d2300ef.152ad47e.js rel=prefetch><link href=static/js/chunk-2d230fe7.9061c75b.js rel=prefetch><link href=static/js/chunk-37f7a892.95be9ad9.js rel=prefetch><link href=static/js/chunk-4472f2d7.6d260979.js rel=prefetch><link href=static/js/chunk-448755e2.ac0363b8.js rel=prefetch><link href=static/js/chunk-4cf8ab8c.8713db3a.js rel=prefetch><link href=static/js/chunk-5025ea04.67e49172.js rel=prefetch><link href=static/js/chunk-50ecaaf8.62e34f1f.js rel=prefetch><link href=static/js/chunk-63af86fe.acec12e0.js rel=prefetch><link href=static/js/chunk-6e3b3ca0.51a7906a.js rel=prefetch><link href=static/js/chunk-733c35b2.f3692024.js rel=prefetch><link href=static/js/chunk-75f11c77.748823eb.js rel=prefetch><link href=static/js/chunk-78234ca2.9556cbc0.js rel=prefetch><link href=static/js/chunk-793f0082.72e9a3f4.js rel=prefetch><link href=static/js/chunk-913f50a6.edcd6d0c.js rel=prefetch><link href=static/js/chunk-c2aa2eac.1a7ac2a4.js rel=prefetch><link href=static/js/chunk-c7b9eaf2.60ca3466.js rel=prefetch><link href=static/js/chunk-d0753fda.4f8d316e.js rel=prefetch><link href=static/css/chunk-vendors.ee57d822.css rel=preload as=style><link href=static/css/index.696877e8.css rel=preload as=style><link href=static/js/chunk-vendors.4c3b0ead.js rel=preload as=script><link href=static/js/index.3ed9c550.js rel=preload as=script><link href=static/css/chunk-vendors.ee57d822.css rel=stylesheet><link href=static/css/index.696877e8.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=static/js/chunk-vendors.4c3b0ead.js></script><script src=static/js/index.3ed9c550.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,81 +1 @@
(function () {
var parent = window.parent;
//dialog对象
dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
//当前打开dialog的编辑器实例
editor = dialog.editor;
UE = parent.UE;
domUtils = UE.dom.domUtils;
utils = UE.utils;
browser = UE.browser;
ajax = UE.ajax;
$G = function ( id ) {
return document.getElementById( id )
};
//focus元素
$focus = function ( node ) {
setTimeout( function () {
if ( browser.ie ) {
var r = node.createTextRange();
r.collapse( false );
r.select();
} else {
node.focus()
}
}, 0 )
};
utils.loadFile(document,{
href: "../themes/default/dialogbase.css?cache="+Math.random(),//xlz原来的路径写错了去掉了一个../
tag:"link",
type:"text/css",
// rel:"stylesheet"
});
lang = editor.getLang(dialog.className.split( "-" )[2]);
if(lang){
domUtils.on(window,'load',function () {
var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
//针对静态资源
for ( var i in lang["static"] ) {
var dom = $G( i );
if(!dom) continue;
var tagName = dom.tagName,
content = lang["static"][i];
if(content.src){
//clone
content = utils.extend({},content,false);
content.src = langImgPath + content.src;
}
if(content.style){
content = utils.extend({},content,false);
content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
}
switch ( tagName.toLowerCase() ) {
case "var":
dom.parentNode.replaceChild( document.createTextNode( content ), dom );
break;
case "select":
var ops = dom.options;
for ( var j = 0, oj; oj = ops[j]; ) {
oj.innerHTML = content.options[j++];
}
for ( var p in content ) {
p != "options" && dom.setAttribute( p, content[p] );
}
break;
default :
domUtils.setAttributes( dom, content);
}
}
} );
}
})();
!function(){var e=window.parent;dialog=e.$EDITORUI[window.frameElement.id.replace(/_iframe$/,"")],editor=dialog.editor,UE=e.UE,domUtils=UE.dom.domUtils,utils=UE.utils,browser=UE.browser,ajax=UE.ajax,$G=function(e){return document.getElementById(e)},$focus=function(t){setTimeout(function(){if(browser.ie){var e=t.createTextRange();e.collapse(!1),e.select()}else t.focus()},0)},utils.loadFile(document,{href:"../themes/default/dialogbase.css?cache="+Math.random(),tag:"link",type:"text/css"}),lang=editor.getLang(dialog.className.split("-")[2]),lang&&domUtils.on(window,"load",function(){var e=editor.options.langPath+editor.options.lang+"/images/";for(var t in lang.static){var a=$G(t);if(a){var o=a.tagName,i=lang.static[t];switch(i.src&&((i=utils.extend({},i,!1)).src=e+i.src),i.style&&((i=utils.extend({},i,!1)).style=i.style.replace(/url\s*\(/g,"url("+e)),o.toLowerCase()){case"var":a.parentNode.replaceChild(document.createTextNode(i),a);break;case"select":for(var s,r=a.options,l=0;s=r[l];)s.innerHTML=i.options[l++];for(var n in i)"options"!=n&&a.setAttribute(n,i[n]);break;default:domUtils.setAttributes(a,i)}}}})}();

View File

@ -1,84 +1 @@
body{
overflow: hidden;
width: 540px;
}
.wrapper {
margin: 10px auto 0;
font-size: 12px;
overflow: hidden;
width: 520px;
height: 315px;
}
.clear {
clear: both;
}
.wrapper .left {
float: left;
margin-left: 10px;;
}
.wrapper .right {
float: right;
border-left: 2px dotted #EDEDED;
padding-left: 15px;
}
.section {
margin-bottom: 15px;
width: 240px;
overflow: hidden;
}
.section h3 {
font-weight: bold;
padding: 5px 0;
margin-bottom: 10px;
border-bottom: 1px solid #EDEDED;
font-size: 12px;
}
.section ul {
list-style: none;
overflow: hidden;
clear: both;
}
.section li {
float: left;
width: 120px;;
}
.section .tone {
width: 80px;;
}
.section .preview {
width: 220px;
}
.section .preview table {
text-align: center;
vertical-align: middle;
color: #666;
}
.section .preview caption {
font-weight: bold;
}
.section .preview td {
border-width: 1px;
border-style: solid;
height: 22px;
}
.section .preview th {
border-style: solid;
border-color: #DDD;
border-width: 2px 1px 1px 1px;
height: 22px;
background-color: #F7F7F7;
}
body{overflow:hidden;width:540px}.wrapper{margin:10px auto 0;font-size:12px;overflow:hidden;width:520px;height:315px}.clear{clear:both}.wrapper .left{float:left;margin-left:10px}.wrapper .right{float:right;border-left:2px dotted #ededed;padding-left:15px}.section{margin-bottom:15px;width:240px;overflow:hidden}.section h3{font-weight:bold;padding:5px 0;margin-bottom:10px;border-bottom:1px solid #ededed;font-size:12px}.section ul{list-style:none;overflow:hidden;clear:both}.section li{float:left;width:120px}.section .tone{width:80px}.section .preview{width:220px}.section .preview table{text-align:center;vertical-align:middle;color:#666}.section .preview caption{font-weight:bold}.section .preview td{border-width:1px;border-style:solid;height:22px}.section .preview th{border-style:solid;border-color:#DDD;border-width:2px 1px 1px 1px;height:22px;background-color:#f7f7f7}

View File

@ -1,237 +1 @@
/**
* Created with JetBrains PhpStorm.
* User: xuheng
* Date: 12-12-19
* Time: 下午4:55
* To change this template use File | Settings | File Templates.
*/
(function () {
var title = $G("J_title"),
titleCol = $G("J_titleCol"),
caption = $G("J_caption"),
sorttable = $G("J_sorttable"),
autoSizeContent = $G("J_autoSizeContent"),
autoSizePage = $G("J_autoSizePage"),
tone = $G("J_tone"),
me,
preview = $G("J_preview");
var editTable = function () {
me = this;
me.init();
};
editTable.prototype = {
init:function () {
var colorPiker = new UE.ui.ColorPicker({
editor:editor
}),
colorPop = new UE.ui.Popup({
editor:editor,
content:colorPiker
});
title.checked = editor.queryCommandState("inserttitle") == -1;
titleCol.checked = editor.queryCommandState("inserttitlecol") == -1;
caption.checked = editor.queryCommandState("insertcaption") == -1;
sorttable.checked = editor.queryCommandState("enablesort") == 1;
var enablesortState = editor.queryCommandState("enablesort"),
disablesortState = editor.queryCommandState("disablesort");
sorttable.checked = !!(enablesortState < 0 && disablesortState >=0);
sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0);
sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:'';
me.createTable(title.checked, titleCol.checked, caption.checked);
me.setAutoSize();
me.setColor(me.getColor());
domUtils.on(title, "click", me.titleHanler);
domUtils.on(titleCol, "click", me.titleColHanler);
domUtils.on(caption, "click", me.captionHanler);
domUtils.on(sorttable, "click", me.sorttableHanler);
domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler);
domUtils.on(autoSizePage, "click", me.autoSizePageHanler);
domUtils.on(tone, "click", function () {
colorPop.showAnchor(tone);
});
domUtils.on(document, 'mousedown', function () {
colorPop.hide();
});
colorPiker.addListener("pickcolor", function () {
me.setColor(arguments[1]);
colorPop.hide();
});
colorPiker.addListener("picknocolor", function () {
me.setColor("");
colorPop.hide();
});
},
createTable:function (hasTitle, hasTitleCol, hasCaption) {
var arr = [],
sortSpan = '<span>^</span>';
arr.push("<table id='J_example'>");
if (hasCaption) {
arr.push("<caption>" + lang.captionName + "</caption>")
}
if (hasTitle) {
arr.push("<tr>");
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>"); }
for (var j = 0; j < 5; j++) {
arr.push("<th>" + lang.titleName + "</th>");
}
arr.push("</tr>");
}
for (var i = 0; i < 6; i++) {
arr.push("<tr>");
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>") }
for (var k = 0; k < 5; k++) {
arr.push("<td>" + lang.cellsName + "</td>")
}
arr.push("</tr>");
}
arr.push("</table>");
preview.innerHTML = arr.join("");
this.updateSortSpan();
},
titleHanler:function () {
var example = $G("J_example"),
frg=document.createDocumentFragment(),
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
colCount = example.rows[0].children.length;
if (title.checked) {
example.insertRow(0);
for (var i = 0, node; i < colCount; i++) {
node = document.createElement("th");
node.innerHTML = lang.titleName;
frg.appendChild(node);
}
example.rows[0].appendChild(frg);
} else {
domUtils.remove(example.rows[0]);
}
me.setColor(color);
me.updateSortSpan();
},
titleColHanler:function () {
var example = $G("J_example"),
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
colArr = example.rows,
colCount = colArr.length;
if (titleCol.checked) {
for (var i = 0, node; i < colCount; i++) {
node = document.createElement("th");
node.innerHTML = lang.titleName;
colArr[i].insertBefore(node, colArr[i].children[0]);
}
} else {
for (var i = 0; i < colCount; i++) {
domUtils.remove(colArr[i].children[0]);
}
}
me.setColor(color);
me.updateSortSpan();
},
captionHanler:function () {
var example = $G("J_example");
if (caption.checked) {
var row = document.createElement('caption');
row.innerHTML = lang.captionName;
example.insertBefore(row, example.firstChild);
} else {
domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]);
}
},
sorttableHanler:function(){
me.updateSortSpan();
},
autoSizeContentHanler:function () {
var example = $G("J_example");
example.removeAttribute("width");
},
autoSizePageHanler:function () {
var example = $G("J_example");
var tds = example.getElementsByTagName(example, "td");
utils.each(tds, function (td) {
td.removeAttribute("width");
});
example.setAttribute('width', '100%');
},
updateSortSpan: function(){
var example = $G("J_example"),
row = example.rows[0];
var spans = domUtils.getElementsByTagName(example,"span");
utils.each(spans,function(span){
span.parentNode.removeChild(span);
});
if (sorttable.checked) {
utils.each(row.cells, function(cell, i){
var span = document.createElement("span");
span.innerHTML = "^";
cell.appendChild(span);
});
}
},
getColor:function () {
var start = editor.selection.getStart(), color,
cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true);
color = cell && domUtils.getComputedStyle(cell, "border-color");
if (!color) color = "#DDDDDD";
return color;
},
setColor:function (color) {
var example = $G("J_example"),
arr = domUtils.getElementsByTagName(example, "td").concat(
domUtils.getElementsByTagName(example, "th"),
domUtils.getElementsByTagName(example, "caption")
);
tone.value = color;
utils.each(arr, function (node) {
node.style.borderColor = color;
});
},
setAutoSize:function () {
var me = this;
autoSizePage.checked = true;
me.autoSizePageHanler();
}
};
new editTable;
dialog.onok = function () {
editor.__hasEnterExecCommand = true;
var checks = {
title:"inserttitle deletetitle",
titleCol:"inserttitlecol deletetitlecol",
caption:"insertcaption deletecaption",
sorttable:"enablesort disablesort"
};
editor.fireEvent('saveScene');
for(var i in checks){
var cmds = checks[i].split(" "),
input = $G("J_" + i);
if(input["checked"]){
editor.queryCommandState(cmds[0])!=-1 &&editor.execCommand(cmds[0]);
}else{
editor.queryCommandState(cmds[1])!=-1 &&editor.execCommand(cmds[1]);
}
}
editor.execCommand("edittable", tone.value);
autoSizeContent.checked ?editor.execCommand('adaptbytext') : "";
autoSizePage.checked ? editor.execCommand("adaptbywindow") : "";
editor.fireEvent('saveScene');
editor.__hasEnterExecCommand = false;
};
})();
!function(){function e(){(r=this).init()}var r,l=$G("J_title"),d=$G("J_titleCol"),i=$G("J_caption"),a=$G("J_sorttable"),c=$G("J_autoSizeContent"),m=$G("J_autoSizePage"),s=$G("J_tone"),u=$G("J_preview");e.prototype={init:function(){var e=new UE.ui.ColorPicker({editor:editor}),t=new UE.ui.Popup({editor:editor,content:e});l.checked=-1==editor.queryCommandState("inserttitle"),d.checked=-1==editor.queryCommandState("inserttitlecol"),i.checked=-1==editor.queryCommandState("insertcaption"),a.checked=1==editor.queryCommandState("enablesort");var o=editor.queryCommandState("enablesort"),n=editor.queryCommandState("disablesort");a.checked=!!(o<0&&0<=n),a.disabled=!!(o<0&&n<0),a.title=o<0&&n<0?lang.errorMsg:"",r.createTable(l.checked,d.checked,i.checked),r.setAutoSize(),r.setColor(r.getColor()),domUtils.on(l,"click",r.titleHanler),domUtils.on(d,"click",r.titleColHanler),domUtils.on(i,"click",r.captionHanler),domUtils.on(a,"click",r.sorttableHanler),domUtils.on(c,"click",r.autoSizeContentHanler),domUtils.on(m,"click",r.autoSizePageHanler),domUtils.on(s,"click",function(){t.showAnchor(s)}),domUtils.on(document,"mousedown",function(){t.hide()}),e.addListener("pickcolor",function(){r.setColor(arguments[1]),t.hide()}),e.addListener("picknocolor",function(){r.setColor(""),t.hide()})},createTable:function(e,t,o){var n=[];if(n.push("<table id='J_example'>"),o&&n.push("<caption>"+lang.captionName+"</caption>"),e){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var i=0;i<5;i++)n.push("<th>"+lang.titleName+"</th>");n.push("</tr>")}for(var a=0;a<6;a++){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var r=0;r<5;r++)n.push("<td>"+lang.cellsName+"</td>");n.push("</tr>")}n.push("</table>"),u.innerHTML=n.join(""),this.updateSortSpan()},titleHanler:function(){var e=$G("J_example"),t=document.createDocumentFragment(),o=domUtils.getComputedStyle(domUtils.getElementsByTagName(e,"td")[0],"border-color"),n=e.rows[0].children.length;if(l.checked){e.insertRow(0);for(var i,a=0;a<n;a++)(i=document.createElement("th")).innerHTML=lang.titleName,t.appendChild(i);e.rows[0].appendChild(t)}else domUtils.remove(e.rows[0]);r.setColor(o),r.updateSortSpan()},titleColHanler:function(){var e=$G("J_example"),t=domUtils.getComputedStyle(domUtils.getElementsByTagName(e,"td")[0],"border-color"),o=e.rows,n=o.length;if(d.checked)for(var i,a=0;a<n;a++)(i=document.createElement("th")).innerHTML=lang.titleName,o[a].insertBefore(i,o[a].children[0]);else for(a=0;a<n;a++)domUtils.remove(o[a].children[0]);r.setColor(t),r.updateSortSpan()},captionHanler:function(){var e=$G("J_example");if(i.checked){var t=document.createElement("caption");t.innerHTML=lang.captionName,e.insertBefore(t,e.firstChild)}else domUtils.remove(domUtils.getElementsByTagName(e,"caption")[0])},sorttableHanler:function(){r.updateSortSpan()},autoSizeContentHanler:function(){$G("J_example").removeAttribute("width")},autoSizePageHanler:function(){var e=$G("J_example"),t=e.getElementsByTagName(e,"td");utils.each(t,function(e){e.removeAttribute("width")}),e.setAttribute("width","100%")},updateSortSpan:function(){var e=$G("J_example"),t=e.rows[0],o=domUtils.getElementsByTagName(e,"span");utils.each(o,function(e){e.parentNode.removeChild(e)}),a.checked&&utils.each(t.cells,function(e,t){var o=document.createElement("span");o.innerHTML="^",e.appendChild(o)})},getColor:function(){var e=editor.selection.getStart(),t=domUtils.findParentByTagName(e,["td","th","caption"],!0);return t&&domUtils.getComputedStyle(t,"border-color")||"#DDDDDD"},setColor:function(t){var e=$G("J_example"),o=domUtils.getElementsByTagName(e,"td").concat(domUtils.getElementsByTagName(e,"th"),domUtils.getElementsByTagName(e,"caption"));s.value=t,utils.each(o,function(e){e.style.borderColor=t})},setAutoSize:function(){m.checked=!0,this.autoSizePageHanler()}},new e,dialog.onok=function(){editor.__hasEnterExecCommand=!0;var e={title:"inserttitle deletetitle",titleCol:"inserttitlecol deletetitlecol",caption:"insertcaption deletecaption",sorttable:"enablesort disablesort"};for(var t in editor.fireEvent("saveScene"),e){var o=e[t].split(" ");$G("J_"+t).checked?-1!=editor.queryCommandState(o[0])&&editor.execCommand(o[0]):-1!=editor.queryCommandState(o[1])&&editor.execCommand(o[1])}editor.execCommand("edittable",s.value),c.checked&&editor.execCommand("adaptbytext"),m.checked&&editor.execCommand("adaptbywindow"),editor.fireEvent("saveScene"),editor.__hasEnterExecCommand=!1}}();

View File

@ -1,74 +1 @@
UE.registerUI('kityformula', function(editor, uiname){
// 创建dialog
var kfDialog = new UE.ui.Dialog({
// 指定弹出层路径
iframeUrl: editor.options.UEDITOR_HOME_URL + 'kityformula-plugin/kityFormulaDialog.html',
// 编辑器实例
editor: editor,
// dialog 名称
name: uiname,
// dialog 标题
title: '插入公式 ',
// dialog 外围 css
cssRules: 'width:783px; height: 386px;',
//如果给出了buttons就代表dialog有确定和取消
buttons:[
{
className:'edui-okbutton',
label:'确定',
onclick:function () {
kfDialog.close(true);
}
},
{
className:'edui-cancelbutton',
label:'取消',
onclick:function () {
kfDialog.close(false);
}
}
]});
editor.ready(function(){
UE.utils.cssRule('kfformula', 'img.kfformula{vertical-align: middle;}', editor.document);
});
var iconUrl = editor.options.UEDITOR_HOME_URL + 'kityformula-plugin/kf-icon.png';
var tmpLink = document.createElement('a');
tmpLink.href = iconUrl;
tmpLink.href = tmpLink.href;
iconUrl = tmpLink.href;
var kfBtn = new UE.ui.Button({
name:'插入' + uiname,
title:'插入公式',
//需要添加的额外样式指定icon图标
cssRules :'background: url("' + iconUrl + '") !important',
onclick:function () {
//渲染dialog
kfDialog.render();
kfDialog.open();
}
});
//当点到编辑内容上时按钮要做的状态反射
editor.addListener('selectionchange', function () {
var state = editor.queryCommandState(uiname);
if (state == -1) {
kfBtn.setDisabled(true);
kfBtn.setChecked(false);
} else {
kfBtn.setDisabled(false);
kfBtn.setChecked(state);
}
});
return kfBtn;
});
UE.registerUI("kityformula",function(t,n){var e=new UE.ui.Dialog({iframeUrl:t.options.UEDITOR_HOME_URL+"kityformula-plugin/kityFormulaDialog.html",editor:t,name:n,title:"插入公式 ",cssRules:"width:783px; height: 386px;",buttons:[{className:"edui-okbutton",label:"确定",onclick:function(){e.close(!0)}},{className:"edui-cancelbutton",label:"取消",onclick:function(){e.close(!1)}}]});t.ready(function(){UE.utils.cssRule("kfformula","img.kfformula{vertical-align: middle;}",t.document)});var i=t.options.UEDITOR_HOME_URL+"kityformula-plugin/kf-icon.png",l=document.createElement("a");l.href=i,l.href=l.href,i=l.href;var o=new UE.ui.Button({name:"插入"+n,title:"插入公式",cssRules:'background: url("'+i+'") !important',onclick:function(){e.render(),e.open()}});return t.addListener("selectionchange",function(){var e=t.queryCommandState(n);-1==e?(o.setDisabled(!0),o.setChecked(!1)):(o.setDisabled(!1),o.setChecked(e))}),o});

View File

@ -1,247 +1 @@
///import core
///plugin 编辑器默认的过滤转换机制
UE.plugins['defaultfilter'] = function () {
var me = this;
me.setOpt({
'allowDivTransToP':true,
'disabledTableInTable':true,
'rgb2Hex':true
});
//默认的过滤处理
//进入编辑器的内容处理
me.addInputRule(function (root) {
var allowDivTransToP = this.options.allowDivTransToP;
var val;
function tdParent(node){
while(node && node.type == 'element'){
if(node.tagName == 'td'){
return true;
}
node = node.parentNode;
}
return false;
}
//进行默认的处理
root.traversal(function (node) {
if (node.type == 'element') {
if (!UE.dom.dtd.$cdata[node.tagName] && me.options.autoClearEmptyNode && UE.dom.dtd.$inline[node.tagName] && !UE.dom.dtd.$empty[node.tagName] && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
if (!node.firstChild()) node.parentNode.removeChild(node);
else if (node.tagName == 'span' && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
node.parentNode.removeChild(node, true)
}
return;
}
switch (node.tagName) {
case 'style':
case 'script':
node.setAttr({
cdata_tag: node.tagName,
cdata_data: (node.innerHTML() || ''),
'_ue_custom_node_':'true'
});
node.tagName = 'div';
node.innerHTML('');
break;
case 'a':
if (val = node.getAttr('href')) {
node.setAttr('_href', val)
}
break;
case 'img':
//todo base64暂时去掉后边做远程图片上传后干掉这个
// if (val = node.getAttr('src')) {
// if (/^data:/.test(val)) {
// node.parentNode.removeChild(node);
// break;
// }
// }
node.setAttr('_src', node.getAttr('src'));
break;
case 'span':
if (UE.browser.webkit && (val = node.getStyle('white-space'))) {
if (/nowrap|normal/.test(val)) {
node.setStyle('white-space', '');
if (me.options.autoClearEmptyNode && UE.utils.isEmptyObject(node.attrs)) {
node.parentNode.removeChild(node, true)
}
}
}
val = node.getAttr('id');
if(val && /^_baidu_bookmark_/i.test(val)){
node.parentNode.removeChild(node)
}
break;
case 'p':
if (val = node.getAttr('align')) {
node.setAttr('align');
node.setStyle('text-align', val)
}
//trace:3431
// var cssStyle = node.getAttr('style');
// if (cssStyle) {
// cssStyle = cssStyle.replace(/(margin|padding)[^;]+/g, '');
// node.setAttr('style', cssStyle)
//
// }
//p标签不允许嵌套
UE.utils.each(node.children,function(n){
if(n.type == 'element' && n.tagName == 'p'){
var next = n.nextSibling();
node.parentNode.insertAfter(n,node);
var last = n;
while(next){
var tmp = next.nextSibling();
node.parentNode.insertAfter(next,last);
last = next;
next = tmp;
}
return false;
}
});
if (!node.firstChild()) {
node.innerHTML(UE.browser.ie ? '&nbsp;' : '<br/>')
}
break;
case 'div':
if(node.getAttr('cdata_tag')){
break;
}
//针对代码这里不处理插入代码的div
val = node.getAttr('class');
if(val && /^line number\d+/.test(val)){
break;
}
if(!allowDivTransToP){
break;
}
var tmpNode, p = UE.uNode.createElement('p');
while (tmpNode = node.firstChild()) {
if (tmpNode.type == 'text' || !UE.dom.UE.dom.dtd.$block[tmpNode.tagName]) {
p.appendChild(tmpNode);
} else {
if (p.firstChild()) {
node.parentNode.insertBefore(p, node);
p = UE.uNode.createElement('p');
} else {
node.parentNode.insertBefore(tmpNode, node);
}
}
}
if (p.firstChild()) {
node.parentNode.insertBefore(p, node);
}
node.parentNode.removeChild(node);
break;
case 'dl':
node.tagName = 'ul';
break;
case 'dt':
case 'dd':
node.tagName = 'li';
break;
case 'li':
var className = node.getAttr('class');
if (!className || !/list\-/.test(className)) {
node.setAttr()
}
var tmpNodes = node.getNodesByTagName('ol ul');
UE.utils.each(tmpNodes, function (n) {
node.parentNode.insertAfter(n, node);
});
break;
case 'td':
case 'th':
case 'caption':
if(!node.children || !node.children.length){
node.appendChild(UE.browser.ie11below ? UE.uNode.createText(' ') : UE.uNode.createElement('br'))
}
break;
case 'table':
if(me.options.disabledTableInTable && tdParent(node)){
node.parentNode.insertBefore(UE.uNode.createText(node.innerText()),node);
node.parentNode.removeChild(node)
}
}
}
// if(node.type == 'comment'){
// node.parentNode.removeChild(node);
// }
})
});
//从编辑器出去的内容处理
me.addOutputRule(function (root) {
var val;
root.traversal(function (node) {
if (node.type == 'element') {
if (me.options.autoClearEmptyNode && UE.dom.dtd.$inline[node.tagName] && !UE.dom.dtd.$empty[node.tagName] && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
if (!node.firstChild()) node.parentNode.removeChild(node);
else if (node.tagName == 'span' && (!node.attrs || UE.utils.isEmptyObject(node.attrs))) {
node.parentNode.removeChild(node, true)
}
return;
}
switch (node.tagName) {
case 'div':
if (val = node.getAttr('cdata_tag')) {
node.tagName = val;
node.appendChild(UE.uNode.createText(node.getAttr('cdata_data')));
node.setAttr({cdata_tag: '', cdata_data: '','_ue_custom_node_':''});
}
break;
case 'a':
if (val = node.getAttr('_href')) {
node.setAttr({
'href': UE.utils.html(val),
'_href': ''
})
}
break;
break;
case 'span':
val = node.getAttr('id');
if(val && /^_baidu_bookmark_/i.test(val)){
node.parentNode.removeChild(node)
}
//将color的rgb格式转换为#16进制格式
if(me.getOpt('rgb2Hex')){
var cssStyle = node.getAttr('style');
if(cssStyle){
node.setAttr('style',cssStyle.replace(/rgba?\(([\d,\s]+)\)/g,function(a,value){
var array = value.split(",");
if (array.length > 3)
return "";
value = "#";
for (var i = 0, color; color = array[i++];) {
color = parseInt(color.replace(/[^\d]/gi, ''), 10).toString(16);
value += color.length == 1 ? "0" + color : color;
}
return value.toUpperCase();
}))
}
}
break;
case 'img':
if (val = node.getAttr('_src')) {
node.setAttr({
'src': node.getAttr('_src'),
'_src': ''
})
}
}
}
})
});
};
UE.plugins.defaultfilter=function(){var n=this;n.setOpt({allowDivTransToP:!0,disabledTableInTable:!0,rgb2Hex:!0}),n.addInputRule(function(e){var s,d=this.options.allowDivTransToP;e.traversal(function(i){if("element"==i.type){if(!UE.dom.dtd.$cdata[i.tagName]&&n.options.autoClearEmptyNode&&UE.dom.dtd.$inline[i.tagName]&&!UE.dom.dtd.$empty[i.tagName]&&(!i.attrs||UE.utils.isEmptyObject(i.attrs)))return void(i.firstChild()?"span"!=i.tagName||i.attrs&&!UE.utils.isEmptyObject(i.attrs)||i.parentNode.removeChild(i,!0):i.parentNode.removeChild(i));switch(i.tagName){case"style":case"script":i.setAttr({cdata_tag:i.tagName,cdata_data:i.innerHTML()||"",_ue_custom_node_:"true"}),i.tagName="div",i.innerHTML("");break;case"a":(s=i.getAttr("href"))&&i.setAttr("_href",s);break;case"img":i.setAttr("_src",i.getAttr("src"));break;case"span":UE.browser.webkit&&(s=i.getStyle("white-space"))&&/nowrap|normal/.test(s)&&(i.setStyle("white-space",""),n.options.autoClearEmptyNode&&UE.utils.isEmptyObject(i.attrs)&&i.parentNode.removeChild(i,!0)),(s=i.getAttr("id"))&&/^_baidu_bookmark_/i.test(s)&&i.parentNode.removeChild(i);break;case"p":(s=i.getAttr("align"))&&(i.setAttr("align"),i.setStyle("text-align",s)),UE.utils.each(i.children,function(e){if("element"==e.type&&"p"==e.tagName){var t=e.nextSibling();i.parentNode.insertAfter(e,i);for(var a=e;t;){var r=t.nextSibling();i.parentNode.insertAfter(t,a),a=t,t=r}return!1}}),i.firstChild()||i.innerHTML(UE.browser.ie?"&nbsp;":"<br/>");break;case"div":if(i.getAttr("cdata_tag"))break;if((s=i.getAttr("class"))&&/^line number\d+/.test(s))break;if(!d)break;for(var e,t=UE.uNode.createElement("p");e=i.firstChild();)"text"!=e.type&&UE.dom.UE.dom.dtd.$block[e.tagName]?t.firstChild()?(i.parentNode.insertBefore(t,i),t=UE.uNode.createElement("p")):i.parentNode.insertBefore(e,i):t.appendChild(e);t.firstChild()&&i.parentNode.insertBefore(t,i),i.parentNode.removeChild(i);break;case"dl":i.tagName="ul";break;case"dt":case"dd":i.tagName="li";break;case"li":var a=i.getAttr("class");a&&/list\-/.test(a)||i.setAttr();var r=i.getNodesByTagName("ol ul");UE.utils.each(r,function(e){i.parentNode.insertAfter(e,i)});break;case"td":case"th":case"caption":i.children&&i.children.length||i.appendChild(UE.browser.ie11below?UE.uNode.createText(" "):UE.uNode.createElement("br"));break;case"table":n.options.disabledTableInTable&&function(e){for(;e&&"element"==e.type;){if("td"==e.tagName)return 1;e=e.parentNode}}(i)&&(i.parentNode.insertBefore(UE.uNode.createText(i.innerText()),i),i.parentNode.removeChild(i))}}})}),n.addOutputRule(function(e){var a;e.traversal(function(e){if("element"==e.type){if(n.options.autoClearEmptyNode&&UE.dom.dtd.$inline[e.tagName]&&!UE.dom.dtd.$empty[e.tagName]&&(!e.attrs||UE.utils.isEmptyObject(e.attrs)))return void(e.firstChild()?"span"!=e.tagName||e.attrs&&!UE.utils.isEmptyObject(e.attrs)||e.parentNode.removeChild(e,!0):e.parentNode.removeChild(e));switch(e.tagName){case"div":(a=e.getAttr("cdata_tag"))&&(e.tagName=a,e.appendChild(UE.uNode.createText(e.getAttr("cdata_data"))),e.setAttr({cdata_tag:"",cdata_data:"",_ue_custom_node_:""}));break;case"a":(a=e.getAttr("_href"))&&e.setAttr({href:UE.utils.html(a),_href:""});break;case"span":if((a=e.getAttr("id"))&&/^_baidu_bookmark_/i.test(a)&&e.parentNode.removeChild(e),n.getOpt("rgb2Hex")){var t=e.getAttr("style");t&&e.setAttr("style",t.replace(/rgba?\(([\d,\s]+)\)/g,function(e,t){var a=t.split(",");if(3<a.length)return"";t="#";for(var r,i=0;r=a[i++];)t+=1==(r=parseInt(r.replace(/[^\d]/gi,""),10).toString(16)).length?"0"+r:r;return t.toUpperCase()}))}break;case"img":(a=e.getAttr("_src"))&&e.setAttr({src:e.getAttr("_src"),_src:""})}}})})};

View File

@ -1,66 +1 @@
/**
* Created by zhangbo21 on 14-9-2.
*/
/*
* getKfContent : 将image的src从base64替换为文件名
* param : callback -- 回调函数 其参数为替换之后的内容
* return : void
* */
UE.Editor.prototype.getKfContent = function(callback){
var me = this;
var actionUrl = me.getActionUrl(me.getOpt('scrawlActionName')),
params = UE.utils.serializeParam(me.queryCommandValue('serverparam')) || '',
url = UE.utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params);
// 找到所有的base64
var count = 0;
var imgs =me.body.getElementsByTagName('img');
var base64Imgs = [];
UE.utils.each(imgs, function(item){
var imgType = item.getAttribute('src').match(/^[^;]+/)[0];
if ( imgType === 'data:image/png') {
base64Imgs.push(item);
}
});
if (base64Imgs.length == 0){
execCallback();
} else {
UE.utils.each(base64Imgs, function(item){
var opt ={};
opt[me.getOpt('scrawlFieldName')]= item.getAttribute('src').replace(/^[^,]+,/, '');
opt.onsuccess = function(xhr){
var json = UE.utils.str2json(xhr.responseText),
url = me.options.scrawlUrlPrefix + json.url;
item.setAttribute('src', url);
item.setAttribute('_src', url);
count++;
execCallback();
}
opt.onerror = function(err){
console.error(err);
count++;
execCallback();
}
UE.ajax.request(url, opt);
});
}
function execCallback(){
if (count >= base64Imgs.length) {
me.sync();
callback(me.getContent());
}
}
};
UE.Editor.prototype.getKfContent=function(t){var s=this,e=s.getActionUrl(s.getOpt("scrawlActionName")),r=UE.utils.serializeParam(s.queryCommandValue("serverparam"))||"",a=UE.utils.formatUrl(e+(-1==e.indexOf("?")?"?":"&")+r),i=0,n=s.body.getElementsByTagName("img"),o=[];function c(){i>=o.length&&(s.sync(),t(s.getContent()))}UE.utils.each(n,function(t){"data:image/png"===t.getAttribute("src").match(/^[^;]+/)[0]&&o.push(t)}),0==o.length?c():UE.utils.each(o,function(n){var t={};t[s.getOpt("scrawlFieldName")]=n.getAttribute("src").replace(/^[^,]+,/,""),t.onsuccess=function(t){var e=UE.utils.str2json(t.responseText),r=s.options.scrawlUrlPrefix+e.url;n.setAttribute("src",r),n.setAttribute("_src",r),i++,c()},t.onerror=function(t){console.error(t),i++,c()},UE.ajax.request(a,t)})};

View File

@ -1,40 +1 @@
.kf-editor {
width: 100%;
height: 100%;
border: 1px solid #e0e0e0;
position: relative;
top: 0;
left: 0;
overflow: hidden;
z-index: 2;
background-color: #f6f5ee;
}
.kf-editor-edit-area {
position: relative;
top: 0;
left: 0;
z-index: 1;
height: 0;
background-color: white;
/*background-color: white;*/
/*background-size: 21px 21px;*/
/*background-position: 0 0,10px 10px;*/
/*background-image: -webkit-linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef),-webkit-linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef);*/
/*background-image: linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef),linear-gradient(45deg,#efefef 25%,transparent 25%,transparent 75%,#efefef 75%,#efefef);*/
}
.kf-editor-canvas-container {
width: 100%;
height: 100%;
}
.kf-editor-input-box {
position: fixed;
top: 0;
left: -99999999px;
z-index: 999999;
}
.kf-editor{width:100%;height:100%;border:1px solid #e0e0e0;position:relative;top:0;left:0;overflow:hidden;z-index:2;background-color:#f6f5ee}.kf-editor-edit-area{position:relative;top:0;left:0;z-index:1;height:0;background-color:white}.kf-editor-canvas-container{width:100%;height:100%}.kf-editor-input-box{position:fixed;top:0;left:-99999999px;z-index:999999}

View File

@ -1,12 +1 @@
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
background: rgba( 48, 48, 48, 0.5 );
}
body {
height: 1000px;
}
html,body{width:100%;height:100%;padding:0;margin:0;background:rgba(48,48,48,0.5)}body{height:1000px}

View File

@ -1,78 +1,3 @@
/*!
* 滚动条
**/
.kf-editor-edit-scrollbar {
width: 100%;
height: 16px;
position: absolute;
bottom: 0;
left: 0;
z-index: 994;
border-top: 1px solid #ddd;
}
.kf-editor-ui-left-button {
position: absolute;
top: 0;
left: 0;
width: 5px;
height: 100%;
background: white;
}
.kf-editor-ui-right-button {
position: absolute;
top: 0;
right: 0;
width: 5px;
height: 100%;
background: white;
}
.kf-editor-ui-track {
position: absolute;
top: 0;
left: 5px;
width: 0;
height: 100%;
background-image: url(../images/scrollbar/edit/bar-left.png), url(../images/scrollbar/edit/bar-right.png), url(../images/scrollbar/edit/bar-bg.png);
background-repeat: no-repeat, no-repeat, repeat-x;
background-position: 0 0, right 0, 0 0;
}
.kf-editor-ui-thumb {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
}
.kf-editor-ui-thumb-left {
width: 5px;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: url(../images/scrollbar/edit/thumb-left.png) no-repeat 0 0;
z-index: 1;
}
.kf-editor-ui-thumb-right {
width: 5px;
height: 100%;
position: absolute;
top: 0;
right: 0;
background: url(../images/scrollbar/edit/thumb-right.png) no-repeat 0 0;
}
.kf-editor-ui-thumb-body {
position: absolute;
top: 0;
left: 5px;
width: 0;
height: 100%;
background: url(../images/scrollbar/edit/thumb-bg.png) repeat-x 0 0;
}
**/.kf-editor-edit-scrollbar{width:100%;height:16px;position:absolute;bottom:0;left:0;z-index:994;border-top:1px solid #ddd}.kf-editor-ui-left-button{position:absolute;top:0;left:0;width:5px;height:100%;background:white}.kf-editor-ui-right-button{position:absolute;top:0;right:0;width:5px;height:100%;background:white}.kf-editor-ui-track{position:absolute;top:0;left:5px;width:0;height:100%;background-image:url(../images/scrollbar/edit/bar-left.png),url(../images/scrollbar/edit/bar-right.png),url(../images/scrollbar/edit/bar-bg.png);background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 0,right 0,0 0}.kf-editor-ui-thumb{position:absolute;top:0;left:0;width:0;height:100%}.kf-editor-ui-thumb-left{width:5px;height:100%;position:absolute;top:0;left:0;background:url(../images/scrollbar/edit/thumb-left.png) no-repeat 0 0;z-index:1}.kf-editor-ui-thumb-right{width:5px;height:100%;position:absolute;top:0;right:0;background:url(../images/scrollbar/edit/thumb-right.png) no-repeat 0 0}.kf-editor-ui-thumb-body{position:absolute;top:0;left:5px;width:0;height:100%;background:url(../images/scrollbar/edit/thumb-bg.png) repeat-x 0 0}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,100 +1 @@
/*弹出对话框页面样式组件
*/
/*reset
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
outline: 0;
font-size: 100%;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*module
*/
body {
background-color: #fff;
font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA;
color: #646464;
}
/*tab*/
.tabhead {
position: relative;
z-index: 10;
}
.tabhead span {
display: inline-block;
padding: 0 5px;
height: 30px;
border: 1px solid #ccc;
background: url("images/dialog-title-bg.png") repeat-x;
text-align: center;
line-height: 30px;
cursor: pointer;
*margin-right: 5px;
}
.tabhead span.focus {
height: 31px;
border-bottom: none;
background: #fff;
}
.tabbody {
position: relative;
top: -1px;
margin: 0 auto;
border: 1px solid #ccc;
}
/*button*/
a.button {
display: block;
text-align: center;
line-height: 24px;
text-decoration: none;
height: 24px;
width: 95px;
border: 0;
color: #838383;
background: url(../../themes/default/images/icons-all.gif) no-repeat;
}
a.button:hover {
background-position: 0 -30px;
}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;outline:0;font-size:100%}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;font:12px/1.5 sans-serif,"宋体","Arial Narrow",HELVETICA;color:#646464}.tabhead{position:relative;z-index:10}.tabhead span{display:inline-block;padding:0 5px;height:30px;border:1px solid #ccc;background:url("images/dialog-title-bg.png") repeat-x;text-align:center;line-height:30px;cursor:pointer;*margin-right:5px}.tabhead span.focus{height:31px;border-bottom:0;background:#fff}.tabbody{position:relative;top:-1px;margin:0 auto;border:1px solid #ccc}a.button{display:block;text-align:center;line-height:24px;text-decoration:none;height:24px;width:95px;border:0;color:#838383;background:url(../../themes/default/images/icons-all.gif) no-repeat}a.button:hover{background-position:0 -30px}

View File

@ -1,7 +1 @@
/*可以在这里添加你自己的css*/
.gapfilling-span{
color: red;
padding: 0px 30px;
margin: 0px 5px;
border-bottom:3px double red;
}
.gapfilling-span{color:red;padding:0 30px;margin:0 5px;border-bottom:3px double red}

View File

@ -1,104 +1 @@
.CodeMirror {
line-height: 1em;
font-family: monospace;
}
.CodeMirror-scroll {
overflow: auto;
height: 300px;
/* This is needed to prevent an IE[67] bug where the scrolled content
is visible outside of the scrolling box. */
position: relative;
}
.CodeMirror-gutter {
position: absolute; left: 0; top: 0;
z-index: 10;
background-color: #f7f7f7;
border-right: 1px solid #eee;
min-width: 2em;
height: 100%;
}
.CodeMirror-gutter-text {
color: #aaa;
text-align: right;
padding: .4em .2em .4em .4em;
white-space: pre !important;
}
.CodeMirror-lines {
padding: .4em;
}
.CodeMirror pre {
-moz-border-radius: 0;
-webkit-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
border-width: 0; margin: 0; padding: 0; background: transparent;
font-family: inherit;
font-size: inherit;
padding: 0; margin: 0;
white-space: pre;
word-wrap: normal;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
}
.CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden;
}
.CodeMirror textarea {
outline: none !important;
}
.CodeMirror pre.CodeMirror-cursor {
z-index: 10;
position: absolute;
visibility: hidden;
border-left: 1px solid black;
}
.CodeMirror-focused pre.CodeMirror-cursor {
visibility: visible;
}
span.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused span.CodeMirror-selected { background: #d2dcf8; }
.CodeMirror-searching {background: #ffa;}
/* Default theme */
.cm-s-default span.cm-keyword {color: #708;}
.cm-s-default span.cm-atom {color: #219;}
.cm-s-default span.cm-number {color: #164;}
.cm-s-default span.cm-def {color: #00f;}
.cm-s-default span.cm-variable {color: black;}
.cm-s-default span.cm-variable-2 {color: #05a;}
.cm-s-default span.cm-variable-3 {color: #085;}
.cm-s-default span.cm-property {color: black;}
.cm-s-default span.cm-operator {color: black;}
.cm-s-default span.cm-comment {color: #a50;}
.cm-s-default span.cm-string {color: #a11;}
.cm-s-default span.cm-string-2 {color: #f50;}
.cm-s-default span.cm-meta {color: #555;}
.cm-s-default span.cm-error {color: #f00;}
.cm-s-default span.cm-qualifier {color: #555;}
.cm-s-default span.cm-builtin {color: #30a;}
.cm-s-default span.cm-bracket {color: #cc7;}
.cm-s-default span.cm-tag {color: #170;}
.cm-s-default span.cm-attribute {color: #00c;}
.cm-s-default span.cm-header {color: #a0a;}
.cm-s-default span.cm-quote {color: #090;}
.cm-s-default span.cm-hr {color: #999;}
.cm-s-default span.cm-link {color: #00c;}
span.cm-header, span.cm-strong {font-weight: bold;}
span.cm-em {font-style: italic;}
span.cm-emstrong {font-style: italic; font-weight: bold;}
span.cm-link {text-decoration: underline;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror{line-height:1em;font-family:monospace}.CodeMirror-scroll{overflow:auto;height:300px;position:relative}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:#f7f7f7;border-right:1px solid #eee;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre !important}.CodeMirror-lines{padding:.4em}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:none !important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}span.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused span.CodeMirror-selected{background:#d2dcf8}.CodeMirror-searching{background:#ffa}.cm-s-default span.cm-keyword{color:#708}.cm-s-default span.cm-atom{color:#219}.cm-s-default span.cm-number{color:#164}.cm-s-default span.cm-def{color:#00f}.cm-s-default span.cm-variable{color:black}.cm-s-default span.cm-variable-2{color:#05a}.cm-s-default span.cm-variable-3{color:#085}.cm-s-default span.cm-property{color:black}.cm-s-default span.cm-operator{color:black}.cm-s-default span.cm-comment{color:#a50}.cm-s-default span.cm-string{color:#a11}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{color:red}.cm-s-default span.cm-qualifier{color:#555}.cm-s-default span.cm-builtin{color:#30a}.cm-s-default span.cm-bracket{color:#cc7}.cm-s-default span.cm-tag{color:#170}.cm-s-default span.cm-attribute{color:#00c}.cm-s-default span.cm-header{color:#a0a}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#00c}span.cm-header,span.cm-strong{font-weight:bold}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:bold}span.cm-link{text-decoration:underline}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,28 +1 @@
.webuploader-container {
position: relative;
}
.webuploader-element-invisible {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px,1px,1px,1px);
}
.webuploader-pick {
position: relative;
display: inline-block;
cursor: pointer;
background: #00b7ee;
padding: 10px 15px;
color: #fff;
text-align: center;
border-radius: 3px;
overflow: hidden;
}
.webuploader-pick-hover {
background: #00a2d4;
}
.webuploader-pick-disable {
opacity: 0.6;
pointer-events:none;
}
.webuploader-container{position:relative}.webuploader-element-invisible{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.webuploader-pick{position:relative;display:inline-block;cursor:pointer;background:#00b7ee;padding:10px 15px;color:#fff;text-align:center;border-radius:3px;overflow:hidden}.webuploader-pick-hover{background:#00a2d4}.webuploader-pick-disable{opacity:.6;pointer-events:none}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -25,8 +25,8 @@
<script src='./admin/components/echarts/echarts.min.js'></script>
<script src='./admin/components/echarts/theme/macarons.js'></script>
<script src='./admin/components/ueditor/ueditor.config.min.js?v=3'></script>
<script src='./admin/components/ueditor/ueditor.all.min.js?v=3'></script>
<script src='./admin/components/ueditor/ueditor.config.js?v=3'></script>
<script src='./admin/components/ueditor/ueditor.all.js?v=3'></script>
<script src='./admin/components/ueditor/lang/zh-cn/zh-cn.js'></script>
<script src='./admin/components/ueditor/kityformula-plugin/addKityFormulaDialog.js'></script>
<script src='./admin/components/ueditor/kityformula-plugin/getKfContent.js'></script>