hoeditor-web 2.0.52 → 2.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hoeditor.common.js +47 -24
- package/lib/hoeditor.css +2 -853
- package/lib/hoeditor.umd.js +47 -24
- package/lib/hoeditor.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/hoeditor.common.js
CHANGED
|
@@ -62712,7 +62712,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62712
62712
|
//if(nodes.length == 0) return;
|
|
62713
62713
|
|
|
62714
62714
|
if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_15__/* .PaintState.psDesign */ .Dh.psDesign && !this._isForceDelete)) {
|
|
62715
|
-
_context.next =
|
|
62715
|
+
_context.next = 33;
|
|
62716
62716
|
break;
|
|
62717
62717
|
}
|
|
62718
62718
|
|
|
@@ -62720,19 +62720,29 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62720
62720
|
|
|
62721
62721
|
case 13:
|
|
62722
62722
|
if (!(n < nodes.length)) {
|
|
62723
|
-
_context.next =
|
|
62723
|
+
_context.next = 33;
|
|
62724
62724
|
break;
|
|
62725
62725
|
}
|
|
62726
62726
|
|
|
62727
62727
|
node = nodes[n];
|
|
62728
62728
|
|
|
62729
|
+
if (!(node instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_21__/* .MarkNode */ .j && node.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_20__/* .TextInputFieldNode */ .re && node.MarkNodeType === 1 && !node.parentNode.isAllowDelete)) {
|
|
62730
|
+
_context.next = 18;
|
|
62731
|
+
break;
|
|
62732
|
+
}
|
|
62733
|
+
|
|
62734
|
+
element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_1___default().alert("元素已设置为不允许删除。请先右键元素属性设置成允许删除,再进行删除操作。", "系统提示");
|
|
62735
|
+
|
|
62736
|
+
return _context.abrupt("return", 0);
|
|
62737
|
+
|
|
62738
|
+
case 18:
|
|
62729
62739
|
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_28__/* .ControlNode */ .w || node instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_20__/* .TextInputFieldNode */ .re)) {
|
|
62730
|
-
_context.next =
|
|
62740
|
+
_context.next = 27;
|
|
62731
62741
|
break;
|
|
62732
62742
|
}
|
|
62733
62743
|
|
|
62734
62744
|
if (node.isAllowDelete) {
|
|
62735
|
-
_context.next =
|
|
62745
|
+
_context.next = 27;
|
|
62736
62746
|
break;
|
|
62737
62747
|
}
|
|
62738
62748
|
|
|
@@ -62758,9 +62768,9 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62758
62768
|
|
|
62759
62769
|
return _context.abrupt("return", 0);
|
|
62760
62770
|
|
|
62761
|
-
case
|
|
62771
|
+
case 27:
|
|
62762
62772
|
if (!(node instanceof _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_33__/* .SignNode */ .N && node.isTemplate && node.number === 0)) {
|
|
62763
|
-
_context.next =
|
|
62773
|
+
_context.next = 30;
|
|
62764
62774
|
break;
|
|
62765
62775
|
}
|
|
62766
62776
|
|
|
@@ -62768,16 +62778,16 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62768
62778
|
|
|
62769
62779
|
return _context.abrupt("return", 0);
|
|
62770
62780
|
|
|
62771
|
-
case
|
|
62781
|
+
case 30:
|
|
62772
62782
|
n++;
|
|
62773
62783
|
_context.next = 13;
|
|
62774
62784
|
break;
|
|
62775
62785
|
|
|
62776
|
-
case
|
|
62786
|
+
case 33:
|
|
62777
62787
|
pnode = (_currRange$npEnd$node = currRange.npEnd.node) === null || _currRange$npEnd$node === void 0 ? void 0 : _currRange$npEnd$node.parentNode;
|
|
62778
62788
|
|
|
62779
62789
|
if (!(pnode && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_20__/* .TextInputFieldNode */ .re && currRange.npEnd.path != hoEditorFactory.docTree.getNodeLastPath(pnode))) {
|
|
62780
|
-
_context.next =
|
|
62790
|
+
_context.next = 39;
|
|
62781
62791
|
break;
|
|
62782
62792
|
}
|
|
62783
62793
|
|
|
@@ -62790,24 +62800,24 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62790
62800
|
});
|
|
62791
62801
|
|
|
62792
62802
|
if (_res[0]) {
|
|
62793
|
-
_context.next =
|
|
62803
|
+
_context.next = 39;
|
|
62794
62804
|
break;
|
|
62795
62805
|
}
|
|
62796
62806
|
|
|
62797
62807
|
return _context.abrupt("return");
|
|
62798
62808
|
|
|
62799
|
-
case
|
|
62809
|
+
case 39:
|
|
62800
62810
|
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_14__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_12__/* .DocAction.daUndoInsert */ .gk.daUndoInsert, currRange.startPath, ""); //FIXME:deleteRange函数完成后调用这个
|
|
62801
62811
|
// hoEditorFactory.docTree.deleteRange(arange.startPath, arange.endPath);
|
|
62802
62812
|
|
|
62803
62813
|
if (currRange.npStart.node && currRange.npEnd.node) {
|
|
62804
|
-
_context.next =
|
|
62814
|
+
_context.next = 42;
|
|
62805
62815
|
break;
|
|
62806
62816
|
}
|
|
62807
62817
|
|
|
62808
62818
|
throw _events_Exception__WEBPACK_IMPORTED_MODULE_22__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62809
62819
|
|
|
62810
|
-
case
|
|
62820
|
+
case 42:
|
|
62811
62821
|
// const [startPath, endPath] = DomRange.skipStartEndTablePath(
|
|
62812
62822
|
// this._hoEditorFactory,
|
|
62813
62823
|
// currRange.startPath,
|
|
@@ -62820,33 +62830,33 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62820
62830
|
res = this.deleteRange(currRange.endPath, currRange.startPath);
|
|
62821
62831
|
|
|
62822
62832
|
if (!(res == 1)) {
|
|
62823
|
-
_context.next =
|
|
62833
|
+
_context.next = 54;
|
|
62824
62834
|
break;
|
|
62825
62835
|
}
|
|
62826
62836
|
|
|
62827
62837
|
changeEvent.beforeChangePath = startPath;
|
|
62828
62838
|
changeEvent.afterChangePath = this._tmp.start;
|
|
62829
|
-
_context.next =
|
|
62839
|
+
_context.next = 52;
|
|
62830
62840
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
62831
62841
|
|
|
62832
|
-
case
|
|
62842
|
+
case 52:
|
|
62833
62843
|
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_18__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_16__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.start));
|
|
62834
62844
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
62835
62845
|
|
|
62836
|
-
case
|
|
62846
|
+
case 54:
|
|
62837
62847
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._tmp.start);
|
|
62838
62848
|
hoEditorFactory.drawTree.moveCaretToPath(this._tmp.start);
|
|
62839
62849
|
aNode = currRange.npStart.node;
|
|
62840
62850
|
|
|
62841
62851
|
if (!(aNode && pnode)) {
|
|
62842
|
-
_context.next =
|
|
62852
|
+
_context.next = 60;
|
|
62843
62853
|
break;
|
|
62844
62854
|
}
|
|
62845
62855
|
|
|
62846
|
-
_context.next =
|
|
62856
|
+
_context.next = 60;
|
|
62847
62857
|
return this.ParentRepaint(pnode);
|
|
62848
62858
|
|
|
62849
|
-
case
|
|
62859
|
+
case 60:
|
|
62850
62860
|
case "end":
|
|
62851
62861
|
return _context.stop();
|
|
62852
62862
|
}
|
|
@@ -206681,7 +206691,7 @@ var SignNode = __webpack_require__(34450);
|
|
|
206681
206691
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
206682
206692
|
var ParagraphNode = __webpack_require__(14208);
|
|
206683
206693
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
206684
|
-
/* harmony default export */ var version = ('2.0.
|
|
206694
|
+
/* harmony default export */ var version = ('2.0.53');
|
|
206685
206695
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
|
|
206686
206696
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
|
|
206687
206697
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
|
|
@@ -209593,6 +209603,14 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
209593
209603
|
return tmp;
|
|
209594
209604
|
} else {
|
|
209595
209605
|
for (var i = 0; i < jnode.childNodes.length; i++) {
|
|
209606
|
+
if (jnode.childNodes[i].nodeName.toLowerCase() == "img") {
|
|
209607
|
+
var src = jnode.childNodes[i].src;
|
|
209608
|
+
|
|
209609
|
+
if (src && src.toString().substring(src.length - 4, src.length) === ".svg") {
|
|
209610
|
+
continue;
|
|
209611
|
+
}
|
|
209612
|
+
}
|
|
209613
|
+
|
|
209596
209614
|
var fun = this.convert.get(jnode.childNodes[i].nodeName.toLowerCase());
|
|
209597
209615
|
|
|
209598
209616
|
if (fun) {
|
|
@@ -209853,7 +209871,7 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
209853
209871
|
|
|
209854
209872
|
var width = styleobj.width ? styleobj.width.replace("px", "") : 20;
|
|
209855
209873
|
var height = styleobj.height ? styleobj.height.replace("px", "") : 20;
|
|
209856
|
-
var node = new ImageNode/* ImageNode */.H(this._hoEditorFactoryID, HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).docTree.activeNodes, null, BaseNode/* NodeType.ntImage */.Jq.ntImage, HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).gernerateCode.generateID("IMG"), jquery_default()(jnode).attr("src") || "", width, height);
|
|
209874
|
+
var node = new ImageNode/* ImageNode */.H(this._hoEditorFactoryID, HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).docTree.activeNodes, null, BaseNode/* NodeType.ntImage */.Jq.ntImage, HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).gernerateCode.generateID("IMG"), jquery_default()(jnode).attr("src") || "", Number(width), Number(height));
|
|
209857
209875
|
return [node];
|
|
209858
209876
|
}
|
|
209859
209877
|
}, {
|
|
@@ -210067,7 +210085,8 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
210067
210085
|
var textstyle = this.HTMLStyleToParsStyle(styleobj);
|
|
210068
210086
|
if (textstyle.lineSpace === 0) textstyle.lineSpace = undefined;
|
|
210069
210087
|
var index = hoEditorFactory.docTree.styleCompare(textstyle);
|
|
210070
|
-
var node = new ParagraphNode/* ParagraphNode */.C(this._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, hoEditorFactory.docTree.getParentNode(HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).docTree.curDomRange.normalize().startPath), index
|
|
210088
|
+
var node = new ParagraphNode/* ParagraphNode */.C(this._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, hoEditorFactory.docTree.getParentNode(HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).docTree.curDomRange.normalize().startPath), index //hoEditorFactory.docTree.curParaNo
|
|
210089
|
+
);
|
|
210071
210090
|
tmp.push(node);
|
|
210072
210091
|
|
|
210073
210092
|
if (jnode.childNodes.length == 0) {
|
|
@@ -213253,7 +213272,7 @@ var NodeConvert = /*#__PURE__*/function () {
|
|
|
213253
213272
|
if (!uidArr[i]) continue;
|
|
213254
213273
|
|
|
213255
213274
|
if (i > 0) {
|
|
213256
|
-
var paraNode = new ParagraphNode/* ParagraphNode */.C(this._hoEditorFactoryID, hoEditorFactory.docTree.mainNodes, null,
|
|
213275
|
+
var paraNode = new ParagraphNode/* ParagraphNode */.C(this._hoEditorFactoryID, hoEditorFactory.docTree.mainNodes, null, hoEditorFactory.docTree.curParaNo);
|
|
213257
213276
|
nodes.push(paraNode);
|
|
213258
213277
|
}
|
|
213259
213278
|
|
|
@@ -221232,6 +221251,10 @@ var EditController = /*#__PURE__*/function () {
|
|
|
221232
221251
|
for (var n = 0; n < nodes.length; n++) {
|
|
221233
221252
|
var node = nodes[n];
|
|
221234
221253
|
if (node instanceof ParagraphNode/* ParagraphNode */.C || node instanceof TextNode/* TextNode */.R || node instanceof MarkNode/* MarkNode */.j || node instanceof ControlNode/* ControlNode */.w) node.styleIndex = hoeditorfactory.docTree.curStyleIndex;
|
|
221254
|
+
|
|
221255
|
+
if (node instanceof ParagraphNode/* ParagraphNode */.C) {
|
|
221256
|
+
node.paraNo = hoeditorfactory.docTree.curParaNo;
|
|
221257
|
+
}
|
|
221235
221258
|
}
|
|
221236
221259
|
}
|
|
221237
221260
|
|