Browse Source

Merge branch 'master' of http://cloud.finedevelop.com:2015/scm/fui/fineui

# Conflicts:
#	dist/_fineui.min.js
#	dist/bundle.min.js
#	dist/fineui.min.js
es6
windy 7 years ago
parent
commit
6e45e2851e
  1. 102
      dist/bundle.js
  2. 102
      dist/case.js
  3. 102
      dist/fineui.js
  4. BIN
      dist/font/iconfont.eot
  5. 69
      dist/font/iconfont.svg
  6. BIN
      dist/font/iconfont.ttf
  7. BIN
      dist/font/iconfont.woff
  8. 61
      src/case/richeditor/bar/action.richeditor.param.js
  9. 39
      src/case/richeditor/niceditor/niceditor.js

102
dist/bundle.js vendored

@ -82900,29 +82900,29 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorParamAction.superclass._init.apply(this, arguments);
},
_createBlankNode: function () {
return $("<span>").html("&nbsp;");
},
_addBlank: function ($param) {
var o = this.options;
var instance = o.editor.selectedInstance;
var next = $param.next();
if (next.length === 0) {
var nextNode = this._createBlankNode();
$param.after(nextNode);
instance.setFocus(nextNode[0]);
} else {
instance.setFocus(next[0]);
}
},
_get$Sel: function () {
var o = this.options;
var instance = o.editor.selectedInstance;
var sel = $(instance.selElm());
return sel;
},
// _createBlankNode: function () {
// return $("<span>").html("&nbsp;");
// },
// _addBlank: function ($param) {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var next = $param.next();
// if (next.length === 0) {
// var nextNode = this._createBlankNode();
// $param.after(nextNode);
// instance.setFocus(nextNode[0]);
// } else {
// instance.setFocus(next[0]);
// }
// },
//
// _get$Sel: function () {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var sel = $(instance.selElm());
// return sel;
// },
addParam: function (param) {
var o = this.options;
@ -82933,14 +82933,15 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
image.alt = param;
image.style = attrs.style;
$(image).addClass("rich-editor-param");
var sel = this._get$Sel();
var wrapper = o.editor.instance.getElm().element;
if (wrapper.find(sel).length <= 0) {
wrapper.append(image);
} else {
sel.after(image);
}
this._addBlank($(image));
this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element;
// if (wrapper.find(sel).length <= 0) {
// wrapper.append(image);
// } else {
// sel.after(image);
// }
// this._addBlank($(image));
}
});
@ -83153,12 +83154,24 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} else {
console.error("不支持此浏览器");
}
if(o.readOnly) {
if (o.readOnly) {
newInstance.disable();
}
return newInstance;
},
insertElem: function ($elem) {
if (this.selectedInstance) {
this.selectedInstance.insertElem($elem);
}
},
insertHTML: function (html) {
if (this.selectedInstance) {
this.selectedInstance.insertHTML(html);
}
},
nicCommand: function (cmd, args) {
if (this.selectedInstance) {
this.selectedInstance.nicCommand(cmd, args);
@ -83401,6 +83414,31 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
this.elm.element.html(this.content);
},
insertElem: function ($elem) {
var range = this.getRng();
if (range.insertNode) {
range.deleteContents();
range.insertNode($elem);
}
},
insertHTML: function (html) {
var range = this.getRng();
if (document.queryCommandState("insertHTML")) {
// W3C
this.nicCommand("insertHTML", html);
} else if (range.insertNode) {
// IE
range.deleteContents();
range.insertNode($(html)[0]);
} else if (range.pasteHTML) {
// IE <= 10
range.pasteHTML(html);
}
},
nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args);
}

102
dist/case.js vendored

@ -10427,29 +10427,29 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorParamAction.superclass._init.apply(this, arguments);
},
_createBlankNode: function () {
return $("<span>").html("&nbsp;");
},
_addBlank: function ($param) {
var o = this.options;
var instance = o.editor.selectedInstance;
var next = $param.next();
if (next.length === 0) {
var nextNode = this._createBlankNode();
$param.after(nextNode);
instance.setFocus(nextNode[0]);
} else {
instance.setFocus(next[0]);
}
},
_get$Sel: function () {
var o = this.options;
var instance = o.editor.selectedInstance;
var sel = $(instance.selElm());
return sel;
},
// _createBlankNode: function () {
// return $("<span>").html("&nbsp;");
// },
// _addBlank: function ($param) {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var next = $param.next();
// if (next.length === 0) {
// var nextNode = this._createBlankNode();
// $param.after(nextNode);
// instance.setFocus(nextNode[0]);
// } else {
// instance.setFocus(next[0]);
// }
// },
//
// _get$Sel: function () {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var sel = $(instance.selElm());
// return sel;
// },
addParam: function (param) {
var o = this.options;
@ -10460,14 +10460,15 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
image.alt = param;
image.style = attrs.style;
$(image).addClass("rich-editor-param");
var sel = this._get$Sel();
var wrapper = o.editor.instance.getElm().element;
if (wrapper.find(sel).length <= 0) {
wrapper.append(image);
} else {
sel.after(image);
}
this._addBlank($(image));
this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element;
// if (wrapper.find(sel).length <= 0) {
// wrapper.append(image);
// } else {
// sel.after(image);
// }
// this._addBlank($(image));
}
});
@ -10680,12 +10681,24 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} else {
console.error("不支持此浏览器");
}
if(o.readOnly) {
if (o.readOnly) {
newInstance.disable();
}
return newInstance;
},
insertElem: function ($elem) {
if (this.selectedInstance) {
this.selectedInstance.insertElem($elem);
}
},
insertHTML: function (html) {
if (this.selectedInstance) {
this.selectedInstance.insertHTML(html);
}
},
nicCommand: function (cmd, args) {
if (this.selectedInstance) {
this.selectedInstance.nicCommand(cmd, args);
@ -10928,6 +10941,31 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
this.elm.element.html(this.content);
},
insertElem: function ($elem) {
var range = this.getRng();
if (range.insertNode) {
range.deleteContents();
range.insertNode($elem);
}
},
insertHTML: function (html) {
var range = this.getRng();
if (document.queryCommandState("insertHTML")) {
// W3C
this.nicCommand("insertHTML", html);
} else if (range.insertNode) {
// IE
range.deleteContents();
range.insertNode($(html)[0]);
} else if (range.pasteHTML) {
// IE <= 10
range.pasteHTML(html);
}
},
nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args);
}

102
dist/fineui.js vendored

@ -83143,29 +83143,29 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorParamAction.superclass._init.apply(this, arguments);
},
_createBlankNode: function () {
return $("<span>").html("&nbsp;");
},
_addBlank: function ($param) {
var o = this.options;
var instance = o.editor.selectedInstance;
var next = $param.next();
if (next.length === 0) {
var nextNode = this._createBlankNode();
$param.after(nextNode);
instance.setFocus(nextNode[0]);
} else {
instance.setFocus(next[0]);
}
},
_get$Sel: function () {
var o = this.options;
var instance = o.editor.selectedInstance;
var sel = $(instance.selElm());
return sel;
},
// _createBlankNode: function () {
// return $("<span>").html("&nbsp;");
// },
// _addBlank: function ($param) {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var next = $param.next();
// if (next.length === 0) {
// var nextNode = this._createBlankNode();
// $param.after(nextNode);
// instance.setFocus(nextNode[0]);
// } else {
// instance.setFocus(next[0]);
// }
// },
//
// _get$Sel: function () {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var sel = $(instance.selElm());
// return sel;
// },
addParam: function (param) {
var o = this.options;
@ -83176,14 +83176,15 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
image.alt = param;
image.style = attrs.style;
$(image).addClass("rich-editor-param");
var sel = this._get$Sel();
var wrapper = o.editor.instance.getElm().element;
if (wrapper.find(sel).length <= 0) {
wrapper.append(image);
} else {
sel.after(image);
}
this._addBlank($(image));
this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element;
// if (wrapper.find(sel).length <= 0) {
// wrapper.append(image);
// } else {
// sel.after(image);
// }
// this._addBlank($(image));
}
});
@ -83396,12 +83397,24 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} else {
console.error("不支持此浏览器");
}
if(o.readOnly) {
if (o.readOnly) {
newInstance.disable();
}
return newInstance;
},
insertElem: function ($elem) {
if (this.selectedInstance) {
this.selectedInstance.insertElem($elem);
}
},
insertHTML: function (html) {
if (this.selectedInstance) {
this.selectedInstance.insertHTML(html);
}
},
nicCommand: function (cmd, args) {
if (this.selectedInstance) {
this.selectedInstance.nicCommand(cmd, args);
@ -83644,6 +83657,31 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
this.elm.element.html(this.content);
},
insertElem: function ($elem) {
var range = this.getRng();
if (range.insertNode) {
range.deleteContents();
range.insertNode($elem);
}
},
insertHTML: function (html) {
var range = this.getRng();
if (document.queryCommandState("insertHTML")) {
// W3C
this.nicCommand("insertHTML", html);
} else if (range.insertNode) {
// IE
range.deleteContents();
range.insertNode($(html)[0]);
} else if (range.pasteHTML) {
// IE <= 10
range.pasteHTML(html);
}
},
nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args);
}

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

69
dist/font/iconfont.svg vendored

@ -993,6 +993,75 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
<glyph glyph-name="tuozhuai-heng" unicode="&#59282;" d="M896 469.333333a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666667 0a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m170.666667-170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666667 0a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666666 170.666666a42.666667 42.666667 0 1 0-85.333334 0 42.666667 42.666667 0 0 0 85.333334 0z m0-170.666666a42.666667 42.666667 0 1 0-85.333334 0 42.666667 42.666667 0 0 0 85.333334 0z m-170.666667 170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m0-170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666667 170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m0-170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-baobiaozhanshi" unicode="&#58984;" d="M224 627.2H140.8v-614.4h742.4V755.2H300.8V128a38.4 38.4 0 0 0-76.8 0V627.2zM960 576v-576a64 64 0 0 0-64-64H128a64 64 0 0 0-64 64V640a64 64 0 0 0 64 64h96V768a64 64 0 0 0 64 64H896a64 64 0 0 0 64-64v-192zM409.6 678.4h108.8a64 64 0 0 0 64-64v-108.8a64 64 0 0 0-64-64H409.6a64 64 0 0 0-64 64V614.4a64 64 0 0 0 64 64z m12.8-160h83.2V601.6H422.4v-83.2z m256 57.6h115.2a38.4 38.4 0 0 0 0-76.8h-115.2a38.4 38.4 0 0 0 0 76.8zM384 371.20000000000005h409.6a38.4 38.4 0 0 0 0-76.8H384a38.4 38.4 0 0 0 0 76.8z m0-140.8h409.6a38.4 38.4 0 0 0 0-76.8H384a38.4 38.4 0 0 0 0 76.8z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-caiwushujuzonghefenxi" unicode="&#58985;" d="M160 832h704a64 64 0 0 0 64-64v-768a64 64 0 0 0-64-64h-704a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64z m12.8-76.8v-742.4h678.4V755.2H172.8z m409.6-294.4h179.2a38.4 38.4 0 0 0 0-76.8H582.4a38.4 38.4 0 0 0 0 76.8z m0 153.6h179.2a38.4 38.4 0 0 0 0-76.8H582.4a38.4 38.4 0 0 0 0 76.8z m-32-307.2h211.2a38.4 38.4 0 0 0 0-76.8H550.4a38.4 38.4 0 0 0 0 76.8z m-288-153.6h499.2a38.4 38.4 0 1 0 0-76.8H262.4a38.4 38.4 0 1 0 0 76.8z m136.384 383.04H454.4a38.4 38.4 0 1 0 0-76.8H387.2v-32H454.4a38.4 38.4 0 1 0 0-76.8H387.2v-104.704a38.4 38.4 0 1 0-76.8 0V351.03999999999996H243.2a38.4 38.4 0 0 0 0 76.8h67.2v32H243.2a38.4 38.4 0 0 0 0 76.8h56.64l-69.76 69.76a38.4 38.4 0 1 0 54.272 54.4l64.96-65.024 64.96 64.96a38.4 38.4 0 1 0 54.336-54.272l-69.76-69.824z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-duojishangbao" unicode="&#58986;" d="M160 832h704a64 64 0 0 0 64-64v-768a64 64 0 0 0-64-64h-704a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64z m12.8-76.8v-742.4h678.4V755.2H172.8z m153.6-588.8h371.2a38.4 38.4 0 0 0 0-76.8H326.4a38.4 38.4 0 0 0 0 76.8z m224 380.864v-308.736a38.4 38.4 0 0 0-76.8 0V547.2l-62.464-62.4a38.4 38.4 0 1 0-54.272 54.272l128 128a38.4 38.4 0 0 0 54.272 0l128-128a38.4 38.4 0 1 0-54.272-54.272L550.4 547.2z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-canshuchaxun" unicode="&#58987;" d="M883.2 384.256A371.328 371.328 0 0 1 576 749.696v0.448a38.4 38.4 0 0 0 0 76.8V827.52c217.088-31.04 384-217.792 384-443.456a38.4 38.4 0 0 0-76.8 0v0.256zM511.744 12.799999999999955H512A38.4 38.4 0 0 0 512-64a448.128 448.128 0 0 0-443.52 384h0.64a38.4 38.4 0 0 0 76.8 0h0.384a371.328 371.328 0 0 1 365.44-307.2zM69.12 448h-0.512A448.32 448.32 0 0 0 448 827.52v-0.576h0.192a38.4 38.4 0 0 0 0-76.8H448v-0.448A371.52 371.52 0 0 1 146.304 448h-0.448a38.4 38.4 0 0 0-76.8 0z m676.48-243.2l174.4-174.4a38.4 38.4 0 0 0-54.336-54.336l-174.336 174.4a294.4 294.4 0 1 0 54.336 54.336zM512 166.39999999999998a217.6 217.6 0 1 1 0 435.2 217.6 217.6 0 0 1 0-435.2z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-caiwuguanli" unicode="&#58988;" d="M883.2 576V665.6a25.6 25.6 0 0 1-25.6 25.6H166.4a25.6 25.6 0 0 1-25.6-25.6V576h742.4z m0-76.8H140.8v-396.8c0-14.08 11.52-25.6 25.6-25.6h691.2a25.6 25.6 0 0 1 25.6 25.6V499.2zM166.4 768h691.2A102.4 102.4 0 0 0 960 665.6v-563.2a102.4 102.4 0 0 0-102.4-102.4H166.4A102.4 102.4 0 0 0 64 102.39999999999998V665.6A102.4 102.4 0 0 0 166.4 768z m468.48-537.6h175.808a12.8 12.8 0 0 0 11.264-18.816l-37.568-70.4a12.8 12.8 0 0 0-11.264-6.784H597.312a12.8 12.8 0 0 0-11.264 18.816l37.568 70.4a12.8 12.8 0 0 0 11.264 6.784zM230.4 339.20000000000005a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z m128 0a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z m128 0a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z" horiz-adv-x="1194" />
<glyph glyph-name="tubiaoku-qita-" unicode="&#58989;" d="M216.96 773.44h147.2a102.4 102.4 0 0 0 102.4-102.4v-147.2a102.4 102.4 0 0 0-102.4-102.4h-147.2a102.4 102.4 0 0 0-102.4 102.4v147.2a102.4 102.4 0 0 0 102.4 102.4z m0-76.8a25.6 25.6 0 0 1-25.6-25.6v-147.2c0-14.08 11.52-25.6 25.6-25.6h147.2a25.6 25.6 0 0 1 25.6 25.6v147.2a25.6 25.6 0 0 1-25.6 25.6h-147.2z m0-361.664h147.2a102.4 102.4 0 0 0 102.4-102.4v-147.2a102.4 102.4 0 0 0-102.4-102.4h-147.2a102.4 102.4 0 0 0-102.4 102.4v147.2a102.4 102.4 0 0 0 102.4 102.4z m0-76.8a25.6 25.6 0 0 1-25.6-25.6v-147.2c0-14.144 11.52-25.6 25.6-25.6h147.2a25.6 25.6 0 0 1 25.6 25.6v147.2a25.6 25.6 0 0 1-25.6 25.6h-147.2z m439.04 76.8h147.2a102.4 102.4 0 0 0 102.4-102.4v-147.2a102.4 102.4 0 0 0-102.4-102.4h-147.2a102.4 102.4 0 0 0-102.4 102.4v147.2a102.4 102.4 0 0 0 102.4 102.4z m0-76.8a25.6 25.6 0 0 1-25.6-25.6v-147.2c0-14.144 11.392-25.6 25.6-25.6h147.2a25.6 25.6 0 0 1 25.6 25.6v147.2a25.6 25.6 0 0 1-25.6 25.6h-147.2zM552.96 669.8240000000001l104.128 104.128a102.4 102.4 0 0 0 144.832 0l104.064-104.128a102.4 102.4 0 0 0 0-144.768L801.92 420.928a102.4 102.4 0 0 0-144.832 0L552.96 525.056a102.4 102.4 0 0 0 0 144.768z m54.336-54.272a25.6 25.6 0 0 1 0-36.224l104.064-104.064a25.6 25.6 0 0 1 36.224 0l104.064 104.064a25.6 25.6 0 0 1 0 36.224l-104.064 104.064a25.6 25.6 0 0 1-36.224 0L607.36 615.552z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-qita-1" unicode="&#58990;" d="M251.84 652.2239999999999l-17.92-78.08H166.4c-14.08 0-25.6-11.712-25.6-26.112v-507.84c0-14.4 11.52-26.048 25.6-26.048h691.2c14.08 0 25.6 11.648 25.6 26.048V548.0319999999999a25.856 25.856 0 0 1-25.6 26.048h-79.872l-23.232 78.144H857.6c56.576 0 102.4-46.656 102.4-104.192v-507.84c0-57.6-45.824-104.192-102.4-104.192H166.4c-56.576 0-102.4 46.656-102.4 104.192V548.0319999999999c0 57.6 45.824 104.192 102.4 104.192h85.44zM780.8 429.632a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z m-60.16 144.448l-18.816 78.144H322.112l-18.24-78.08H224l44.608 164.48a102.72 102.72 0 0 0 99.328 78.912h288.128c46.976 0 87.936-32.576 99.328-78.912l44.608-164.48h-79.36z m-39.744 145.536a25.664 25.664 0 0 1-24.832 19.776H367.936a25.664 25.664 0 0 1-24.832-19.776l-20.736-67.392h379.264l-20.736 67.392zM512 92.28800000000001c-106.048 0-192 87.424-192 195.328 0 107.84 85.952 195.328 192 195.328s192-87.488 192-195.328c0-107.904-85.952-195.328-192-195.328z m0 78.08c63.616 0 115.2 52.48 115.2 117.248 0 64.704-51.584 117.184-115.2 117.184s-115.2-52.48-115.2-117.184c0-64.768 51.584-117.248 115.2-117.248z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-qita-2" unicode="&#58991;" d="M883.2 522.88V729.6a25.6 25.6 0 0 1-25.6 25.6H166.4a25.6 25.6 0 0 1-25.6-25.6v-545.152l149.44 124.352a64 64 0 0 0 86.272-4.032l137.152-137.728 349.696 345.344a38.208 38.208 0 0 0 19.84 10.432z m0-98.816l-324.608-320.64a64 64 0 0 0-90.304 0.384l-137.92 138.496-161.536-134.4a38.272 38.272 0 0 0-28.032-8.768v-60.736c0-14.08 11.52-25.6 25.6-25.6h691.2a25.6 25.6 0 0 1 25.6 25.6V424.064zM166.4 832h691.2A102.4 102.4 0 0 0 960 729.6v-691.2a102.4 102.4 0 0 0-102.4-102.4H166.4A102.4 102.4 0 0 0 64 38.39999999999998V729.6A102.4 102.4 0 0 0 166.4 832z m441.6-422.4a134.4 134.4 0 1 0 0 268.8 134.4 134.4 0 0 0 0-268.8z m0 76.8a57.6 57.6 0 1 1 0 115.2 57.6 57.6 0 0 1 0-115.2z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-baobiaotianbao" unicode="&#58992;" d="M511.744 12.799999999999955H512A38.4 38.4 0 0 0 512-64H160a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64v-256a38.4 38.4 0 1 0-76.8 0.256V755.2H172.8v-742.4h338.944zM294.4 614.4h435.2a38.4 38.4 0 0 0 0-76.8H294.4a38.4 38.4 0 0 0 0 76.8z m0-192h243.2a38.4 38.4 0 0 0 0-76.8H294.4a38.4 38.4 0 0 0 0 76.8z m0-192h115.2a38.4 38.4 0 0 0 0-76.8H294.4a38.4 38.4 0 0 0 0 76.8z m556.416 227.072c17.6 0 38.976-8 60.16-20.096l23.552-16.448c39.168-27.52 52.224-59.84 33.856-89.92l-233.216-332.992-124.8-40.256c-14.528-6.848-25.152 0.576-23.68 16.64l-9.984 129.984 233.216 333.056c12.864 15.936 23.296 20.032 40.96 20.032z m-163.776-394.24l205.568 293.248a116.16 116.16 0 0 1-2.048 1.472l-20.48 14.272a148.032 148.032 0 0 1-8.896 4.48l-205.824-293.888 2.24-29.12 29.44 9.472z" horiz-adv-x="1097" />
<glyph glyph-name="tubiaoku-qita-3" unicode="&#58993;" d="M900.224 411.264l-64.192 34.432v-95.232c3.328-2.24-3.648-4.352 0-6.336v-336.96c0-41.152-33.472-74.688-74.688-74.688H264.32a74.752 74.752 0 0 0-74.752 74.688V345.6c3.392 1.856-3.072 2.816 0 4.928V445.952l-63.808-36.864h-12.992a45.44 45.44 0 0 0-31.616 36.864l-3.456 21.888C71.936 503.296 64 594.1120000000001 64 624.192c-0.064 29.76 25.472 58.496 41.6 69.568l194.56 133.12c7.68 5.056 14.464 5.056 21.632 5.056l44.288-0.256 16.64 0.064c7.744 1.024 14.656-2.88 19.84-8.128a28.16 28.16 0 0 0 8.384-19.84 99.008 99.008 0 0 1 100.608-99.2c56.192 0 100.48 43.584 100.544 99.2a28.16 28.16 0 0 0 8.32 19.84c5.312 5.248 12.16 9.472 19.968 8.128h16.64l44.48 0.192c7.296 0 14.208 0 21.696-5.12l199.04-132.864c26.24-18.816 37.312-40.32 36.864-70.208-0.64-6.848-11.584-144.512-17.28-178.048a46.336 46.336 0 0 0-28.992-34.432h-12.608z m-140.992 163.84l112.128-71.616a3199.168 3199.168 0 0 1 3.264 34.688c2.88 31.168 8.32 95.808 7.68 86.72 0.064 4.48 1.152 2.304-2.688 5.12l-187.328 125.056h-10.176A176.064 176.064 0 0 0 511.552 627.8399999999999a176.064 176.064 0 0 0-170.624 127.168l-9.6 0.064L149.12 630.528c-2.88-1.92-8.32-10.048-8.384-6.144 0-21.248 5.12-82.688 9.664-121.792l115.904 74.176v-567.488h492.864v565.76z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-shichangyingxiao" unicode="&#58994;" d="M728.512 633.6H550.4v-627.2h115.2a38.4 38.4 0 0 0 0-76.8H358.4a38.4 38.4 0 0 0 0 76.8h115.2V633.6H295.488C375.808 503.296 416 412.608 416 361.472a160 160 0 0 0-320 0c0 51.136 40.192 141.824 120.512 272.128H166.4a38.4 38.4 0 0 0 0 76.8h307.2V800a38.4 38.4 0 1 0 76.8 0v-89.6h307.2a38.4 38.4 0 0 0 0-76.8h-50.112C887.808 503.296 928 412.608 928 361.472a160 160 0 1 0-320 0c0 51.136 40.192 141.824 120.512 272.128zM172.8 361.472a83.2 83.2 0 0 1 166.4 0c0 28.8-27.776 94.08-83.2 188.672-55.424-94.656-83.2-159.936-83.2-188.672z m512 0a83.2 83.2 0 1 1 166.4 0c0 28.8-27.776 94.08-83.2 188.672-55.424-94.656-83.2-159.936-83.2-188.672z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-qita-4" unicode="&#58995;" d="M512-64A448 448 0 1 0 512 832a448 448 0 0 0 0-896z m0 76.8A371.2 371.2 0 1 1 512 755.2a371.2 371.2 0 0 1 0-742.4z m-171.328 209.28a638.912 638.912 0 0 0-19.52 123.52H102.4a38.4 38.4 0 0 0 0 76.8h218.752c2.496 42.432 9.152 83.712 19.52 123.52a448.448 448.448 0 0 0-136.832 88.96c16 22.784 32 42.88 48 60.352a371.84 371.84 0 0 1 112.768-76.032A639.488 639.488 0 0 0 463.936 788.48l2.432-14.592h86.208l2.432 14.592a639.424 639.424 0 0 0 100.032-171.072 371.84 371.84 0 0 1 121.088 81.856l29.44-19.392 46.592-11.328a449.088 449.088 0 0 0-173.44-124.416c10.112-39.232 16.64-79.936 19.072-121.664H921.6a38.4 38.4 0 0 0 0-76.8h-223.808a638.976 638.976 0 0 0-19.008-121.664 449.088 449.088 0 0 0 173.888-124.992l-48.832 12.352-40.96-29.632a371.456 371.456 0 0 1-107.84 68.992 638.4 638.4 0 0 0-71.04-132.608l-48.384-4.288 4.416-4.992-30.592 2.688-30.528-2.688 4.48 4.992-48.512 4.288a638.464 638.464 0 0 0-70.272 130.752 371.712 371.712 0 0 1-110.08-73.408l-57.216 51.456a448.64 448.64 0 0 0 143.36 95.232z m97.472-50.24A562.368 562.368 0 0 1 509.44 46.08000000000004a562.368 562.368 0 0 1 71.744 126.72 373.248 373.248 0 0 1-143.04-0.896z m-24.128 73.408a449.536 449.536 0 0 0 191.168 1.024c8.064 32.128 13.376 65.28 15.68 99.328H398.08c2.24-34.368 7.68-67.904 15.872-100.352z m0 277.504A562.176 562.176 0 0 1 398.08 422.4H620.8a562.176 562.176 0 0 1-15.616 99.328 449.856 449.856 0 0 0-191.168 1.024z m24.128 73.408A372.928 372.928 0 0 1 581.12 595.2a562.368 562.368 0 0 1-71.68 126.72c-28.928-38.4-52.992-80.64-71.36-125.824z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-tongjitubiao" unicode="&#58996;" d="M928 416a38.4 38.4 0 0 0-38.4-38.4H545.088a31.808 31.808 0 0 0-1.088 0 38.4 38.4 0 0 0-38.4 38.4V761.6a38.4 38.4 0 0 0 38.4 38.4 384 384 0 0 0 384-384z m-79.168 38.4A307.328 307.328 0 0 1 582.4 720.832V454.4h266.432z m-69.44-171.584a38.4 38.4 0 1 0 75.776-11.008l0.448-0.128a384 384 0 1 0-447.296 457.6 38.528 38.528 0 0 0 46.464-37.568 38.4 38.4 0 0 0-32.64-37.952A307.328 307.328 0 0 1 480 44.799999999999955a307.328 307.328 0 0 1 299.392 238.016z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-tianbaoluru" unicode="&#58997;" d="M791.04 418.176a38.4 38.4 0 0 0 76.8 0v-354.688c0-52.736-42.752-95.488-95.552-95.488H191.552A95.552 95.552 0 0 0 96 63.488000000000056V644.096c0 52.736 42.816 95.488 95.552 95.488h354.688v-0.128a38.4 38.4 0 0 0 0-76.8v-0.192H196.672a23.488 23.488 0 0 1-23.488-23.488v-570.368c0-12.928 10.496-23.488 23.488-23.488h570.496a23.488 23.488 0 0 1 23.488 23.488V418.176h0.32z m106.816 351.68a102.784 102.784 0 0 0 0-145.408l-434.432-434.048a45.056 45.056 0 0 0-31.808-13.184h-81.92a44.992 44.992 0 0 0-44.992 44.992V304c0 11.904 4.736 23.36 13.184 31.808l434.432 434.048a102.976 102.976 0 0 0 145.536 0z m-54.592-90.88a25.728 25.728 0 1 1-36.352 36.352l-424.96-424.64v-36.352h36.352l424.96 424.64z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-tubiaozhanshi" unicode="&#58998;" d="M140.8 0h780.8a38.4 38.4 0 0 0 0-76.8H102.4a38.4 38.4 0 0 0-37.888 44.8 38.656 38.656 0 0 0-0.512 6.4V793.6a38.4 38.4 0 0 0 76.8 0V0zM812.736 789.6320000000001a38.4 38.4 0 0 0 52.224-56.32v-0.064L595.84 509.888a64 64 0 0 0-81.024-0.576L396.48 604.608l-174.016-158.72a38.4 38.4 0 1 0-52.352 56.128l182.72 166.72a64 64 0 0 0 83.328 2.56l117.76-94.912L812.8 789.6320000000001zM256 320a38.4 38.4 0 0 0 38.4-38.4v-179.2a38.4 38.4 0 0 0-76.8 0V281.6A38.4 38.4 0 0 0 256 320z m140.8 128a38.4 38.4 0 0 0 38.4-38.4v-307.2a38.4 38.4 0 0 0-76.8 0V409.6a38.4 38.4 0 0 0 38.4 38.4z m140.8-128a38.4 38.4 0 0 0 38.4-38.4v-179.2a38.4 38.4 0 0 0-76.8 0V281.6a38.4 38.4 0 0 0 38.4 38.4z m140.8 128a38.4 38.4 0 0 0 38.4-38.4v-307.2a38.4 38.4 0 1 0-76.8 0V409.6a38.4 38.4 0 0 0 38.4 38.4z m140.8 148.608a38.4 38.4 0 0 0 38.4-38.4V102.39999999999998a38.4 38.4 0 0 0-76.8 0V558.2080000000001a38.4 38.4 0 0 0 38.4 38.4z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-xiaoshouguanli" unicode="&#58999;" d="M272 733.76l590.272-61.44a76.8 76.8 0 0 0 67.2-92.416l-40.768-190.272a76.8 76.8 0 0 0-75.072-60.736H358.08l13.248-62.208h512.768a38.4 38.4 0 1 0 0-76.8H344.192a38.4 38.4 0 0 0-42.24 33.6L194.432 729.856l-121.472 39.04a38.4 38.4 0 0 0 19.84 74.176l143.36-44.8a38.656 38.656 0 0 0 28.48-29.44l7.488-35.072z m17.728-83.328L341.76 405.76h471.872l40.704 190.272-564.608 54.464zM426.496-70.39999999999998a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z m0 76.8a25.6 25.6 0 1 1 0 51.2 25.6 25.6 0 0 1 0-51.2z m310.4-76.8a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z m0 76.8a25.6 25.6 0 1 1 0 51.2 25.6 25.6 0 0 1 0-51.2z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-quanxianshiyong" unicode="&#59000;" d="M569.6 291.96799999999996h51.2a38.4 38.4 0 0 0 0-76.8h-51.2v-51.2a38.4 38.4 0 0 0-76.8 0v179.2c0 1.856 0.128 3.648 0.384 5.44a134.4 134.4 0 1 0 76.032 0 38.72 38.72 0 0 0 0.384-5.44v-51.2z m-49.664-412.16c-16.32 7.232-419.584 177.152-419.584 396.416V665.7280000000001a49.28 49.28 0 0 0 50.432 48.96c149.76 0 289.088 103.168 361.728 168.512a25.92 25.92 0 0 0 34.112 0c72.64-65.28 211.968-168.512 363.2-168.512a49.28 49.28 0 0 0 50.432-49.024v-389.44c0-220.672-403.136-389.12-419.584-396.416a26.752 26.752 0 0 0-20.736 0z m-32.512 106.24c15.552-7.68 30.208-14.72 43.84-20.864a1298.112 1298.112 0 0 1 176 96.576c112 74.752 175.936 151.232 175.936 214.4V632.96c-138.496 4.48-266.048 102.208-352.768 159.744-86.4-57.216-212.992-154.88-351.232-159.616v-356.864c0-62.528 64-139.008 176.064-213.952 41.6-27.904 86.656-53.44 132.16-76.16z m43.776 433.92a57.6 57.6 0 1 1 0 115.2 57.6 57.6 0 0 1 0-115.2z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-yunyingguanli" unicode="&#59001;" d="M599.04 9.919999999999959A385.152 385.152 0 0 0 512 0a382.912 382.912 0 0 0-277.888 119.04l68.928 39.744a308.224 308.224 0 0 1 276.8-74.496l19.2-74.368z m267.264 225.792l-66.24 41.216c12.352 33.344 19.136 69.44 19.136 107.072a306.368 306.368 0 0 1-99.84 226.688l48 60.096A383.04 383.04 0 0 0 896 384c0-52.544-10.56-102.656-29.696-148.288zM399.04 669.76a307.84 307.84 0 0 1-184.32-208.192l-0.064 0.064A38.4 38.4 0 1 0 140.096 480a384.832 384.832 0 0 0 245.888 266.88 112 112 0 1 0 13.056-77.12z m344.96-67.968a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z m-153.152-592.64a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8zM496 690.688a35.2 35.2 0 1 1 0 70.4 35.2 35.2 0 0 1 0-70.4zM205.952 96a112 112 0 1 0 0 224 112 112 0 0 0 0-224z m0 76.8a35.2 35.2 0 1 1 0 70.4 35.2 35.2 0 0 1 0-70.4z m621.248-76.8a112 112 0 1 0 0 224 112 112 0 0 0 0-224z m0 76.8a35.2 35.2 0 1 1 0 70.4 35.2 35.2 0 0 1 0-70.4z" horiz-adv-x="1024" />
<glyph glyph-name="tubiaoku-zhutifenxi" unicode="&#59002;" d="M550.4 793.6H832a102.4 102.4 0 0 0 102.4-102.4v-448a102.4 102.4 0 0 0-102.4-102.4H551.04v-28.544a38.72 38.72 0 0 0-0.448-5.888l173.632-100.224a38.4 38.4 0 1 0-38.4-66.496L512.512 39.67999999999995 339.2-60.351999999999975a38.4 38.4 0 0 0-38.4 66.56l173.888 100.352a38.72 38.72 0 0 0-0.448 5.696V140.79999999999995H192a102.4 102.4 0 0 0-102.4 102.4v448A102.4 102.4 0 0 0 192 793.6h281.6v29.12a38.4 38.4 0 0 0 76.8 0V793.6zM192 716.8c-14.08 0-25.6-13.12-25.6-29.376v-440.448c0-16.256 11.52-29.376 25.6-29.376h640c14.08 0 25.6 13.12 25.6 29.376V687.36c0 16.256-11.52 29.376-25.6 29.376H192z m45.696-359.168a38.4 38.4 0 0 0-4.672 54.08l94.912 112.896a64 64 0 0 0 88.64 9.088L572.8 410.368l155.264 178.048a38.4 38.4 0 0 0 57.856-50.432L622.72 350.72a64 64 0 0 0-87.872-8.192l-156.16 123.136L291.84 362.304a38.4 38.4 0 0 0-54.08-4.672z" horiz-adv-x="1024" />
<glyph glyph-name="renliziyuanguanli" unicode="&#59003;" d="M494.336 330.11199999999997a233.6 233.6 0 1 0 267.648 0 329.792 329.792 0 0 0 195.008-278.912c-0.448-0.704-0.448-1.472-0.448-2.176a38.4 38.4 0 1 0-76.672 2.88 252.8 252.8 0 0 1-503.552-0.704c-0.128-0.704-0.128-1.472-0.128-2.176a38.4 38.4 0 1 0-76.8 2.176 329.408 329.408 0 0 0 194.944 278.912z m133.76 34.688a156.8 156.8 0 1 1 0 313.6 156.8 156.8 0 0 1 0-313.6z m-336 31.872a51.2 51.2 0 1 0-3.84-102.336A147.264 147.264 0 0 1 148.48 179.20000000000005h-0.704v-0.64a38.4 38.4 0 1 0-76.8 0.64H70.4a224.256 224.256 0 0 0 127.68 171.328A160 160 0 0 0 292.16 640v-0.256a38.4 38.4 0 1 0-4.352-76.672A83.2 83.2 0 0 1 292.16 396.8v-0.128z" horiz-adv-x="1024" />
<glyph glyph-name="jiqunpeizhi" unicode="&#59004;" d="M155.456 832H868.48c32.832 0 59.456-28.672 59.456-64v-147.2c0-35.328-26.624-64-59.456-64H155.52c-32.832 0-59.456 28.672-59.456 64V768c0 35.328 26.624 64 59.456 64zM172.8 633.6h678.4V755.2H172.8v-121.6z m-17.344-108.8H868.48c32.832 0 59.456-28.672 59.456-64v-147.2c0-35.328-26.624-64-59.456-64H155.52c-32.832 0-59.456 28.672-59.456 64V460.8c0 35.328 26.624 64 59.456 64zM172.8 326.4h678.4V448H172.8v-121.6z m-17.344-108.8H868.48c32.832 0 59.456-28.672 59.456-64v-147.2c0-35.328-26.624-64-59.456-64H155.52c-32.832 0-59.456 28.672-59.456 64v147.2c0 35.328 26.624 64 59.456 64z m17.344-198.4h678.4v121.6H172.8v-121.6z m601.6 636.8a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z m0-307.2a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z m0-307.2a38.4 38.4 0 1 0 0 76.8 38.4 38.4 0 0 0 0-76.8z" horiz-adv-x="1024" />
<glyph glyph-name="zhibiaoziduan_feijuhe" unicode="&#59005;" d="M581.568 701.184c-64.448 0-134.4 33.344-171.904-104.128L392.32 510.72h88.64a29.44 29.44 0 1 0 0-58.944H379.648l-79.616-391.232s-7.68-62.848-46.272-60.48c-44.16 2.752-24.064 65.728-24.064 65.728l79.04 385.984H188.864a29.12 29.12 0 0 0-28.8 26.944c1.152 27.584 13.504 32 28.864 32h132.544l18.56 88.128c12.992 62.336 40.064 114.624 87.104 145.152 46.976 30.464 124.416 24.896 161.408 20.608 15.552-1.664 49.792-4.8 46.208-38.976-2.752-27.264-42.56-24.448-53.12-24.448z m264.64-276.608a32 32 0 0 0 3.968-45.056l-115.328-137.472 115.328-137.408a32 32 0 0 0-49.024-41.152l-108.096 128.832-108.096-128.832a31.808 31.808 0 0 0-45.056-3.904 32 32 0 0 0-3.968 45.056l115.328 137.408L535.936 379.52a32 32 0 1 0 49.024 41.088l108.16-128.768 108.032 128.768a31.936 31.936 0 0 0 45.056 3.968z" horiz-adv-x="1024" />
<glyph glyph-name="queding-lan" unicode="&#59006;" d="M356.544 85.76a32.128 32.128 0 0 0-5.248 4.224L79.744 361.6a32 32 0 0 0 45.312 45.248l252.224-252.224 520.896 520.896a32 32 0 0 0 45.248-45.312l-543.04-543.04a32 32 0 0 0-43.84-1.344z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 241 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

61
src/case/richeditor/bar/action.richeditor.param.js

@ -17,29 +17,29 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorParamAction.superclass._init.apply(this, arguments);
},
_createBlankNode: function () {
return $("<span>").html("&nbsp;");
},
_addBlank: function ($param) {
var o = this.options;
var instance = o.editor.selectedInstance;
var next = $param.next();
if (next.length === 0) {
var nextNode = this._createBlankNode();
$param.after(nextNode);
instance.setFocus(nextNode[0]);
} else {
instance.setFocus(next[0]);
}
},
// _createBlankNode: function () {
// return $("<span>").html("&nbsp;");
// },
_get$Sel: function () {
var o = this.options;
var instance = o.editor.selectedInstance;
var sel = $(instance.selElm());
return sel;
},
// _addBlank: function ($param) {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var next = $param.next();
// if (next.length === 0) {
// var nextNode = this._createBlankNode();
// $param.after(nextNode);
// instance.setFocus(nextNode[0]);
// } else {
// instance.setFocus(next[0]);
// }
// },
//
// _get$Sel: function () {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var sel = $(instance.selElm());
// return sel;
// },
addParam: function (param) {
var o = this.options;
@ -50,14 +50,15 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
image.alt = param;
image.style = attrs.style;
$(image).addClass("rich-editor-param");
var sel = this._get$Sel();
var wrapper = o.editor.instance.getElm().element;
if (wrapper.find(sel).length <= 0) {
wrapper.append(image);
} else {
sel.after(image);
}
this._addBlank($(image));
this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element;
// if (wrapper.find(sel).length <= 0) {
// wrapper.append(image);
// } else {
// sel.after(image);
// }
// this._addBlank($(image));
}
});

39
src/case/richeditor/niceditor/niceditor.js

@ -35,12 +35,24 @@
} else {
console.error("不支持此浏览器");
}
if(o.readOnly) {
if (o.readOnly) {
newInstance.disable();
}
return newInstance;
},
insertElem: function ($elem) {
if (this.selectedInstance) {
this.selectedInstance.insertElem($elem);
}
},
insertHTML: function (html) {
if (this.selectedInstance) {
this.selectedInstance.insertHTML(html);
}
},
nicCommand: function (cmd, args) {
if (this.selectedInstance) {
this.selectedInstance.nicCommand(cmd, args);
@ -283,6 +295,31 @@
this.elm.element.html(this.content);
},
insertElem: function ($elem) {
var range = this.getRng();
if (range.insertNode) {
range.deleteContents();
range.insertNode($elem);
}
},
insertHTML: function (html) {
var range = this.getRng();
if (document.queryCommandState("insertHTML")) {
// W3C
this.nicCommand("insertHTML", html);
} else if (range.insertNode) {
// IE
range.deleteContents();
range.insertNode($(html)[0]);
} else if (range.pasteHTML) {
// IE <= 10
range.pasteHTML(html);
}
},
nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args);
}

Loading…
Cancel
Save