vue-editify 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/editify.es.js +5 -8
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/editify/editify.vue +4 -4
- package/src/index.ts +1 -1
- package/src/plugins/attachment/index.ts +5 -3
package/lib/editify.es.js
CHANGED
@@ -25625,10 +25625,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
25625
25625
|
}
|
25626
25626
|
};
|
25627
25627
|
const handleDeleteComplete = () => {
|
25628
|
-
const uneditable = editor.value.range.anchor.element.getUneditableElement();
|
25629
|
-
if (uneditable) {
|
25630
|
-
uneditable.toEmpty();
|
25631
|
-
}
|
25632
25628
|
};
|
25633
25629
|
const handleAfterRender = () => {
|
25634
25630
|
setVideoHeight();
|
@@ -25821,7 +25817,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
25821
25817
|
};
|
25822
25818
|
}
|
25823
25819
|
});
|
25824
|
-
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
25820
|
+
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2e9e8fac"]]);
|
25825
25821
|
const InsertAttachmentProps = {
|
25826
25822
|
//主题色
|
25827
25823
|
color: {
|
@@ -26070,6 +26066,8 @@ const attachment = (options) => {
|
|
26070
26066
|
options = {};
|
26071
26067
|
}
|
26072
26068
|
const plugin = (editifyInstance, color2, editTrans) => {
|
26069
|
+
const editor = editifyInstance.exposed.editor.value;
|
26070
|
+
const dataRangeCaches = editifyInstance.exposed.dataRangeCaches.value;
|
26073
26071
|
return {
|
26074
26072
|
//附件菜单项配置
|
26075
26073
|
menu: {
|
@@ -26082,6 +26080,7 @@ const attachment = (options) => {
|
|
26082
26080
|
title: options.title || editTrans("insertAttachment"),
|
26083
26081
|
leftBorder: options.leftBorder,
|
26084
26082
|
rightBorder: options.rightBorder,
|
26083
|
+
disabled: editor ? hasPreInRange(editor, dataRangeCaches) : false,
|
26085
26084
|
default: () => h(Icon, { value: "attachment" }),
|
26086
26085
|
layer: (_name, btnInstance) => h(InsertAttachment, {
|
26087
26086
|
color: color2,
|
@@ -26097,7 +26096,6 @@ const attachment = (options) => {
|
|
26097
26096
|
},
|
26098
26097
|
onInsert: (url) => {
|
26099
26098
|
const attachmentElement = new AlexElement("closed", "span", { "data-attachment": url, contenteditable: "false" }, null, null);
|
26100
|
-
const editor = editifyInstance.exposed.editor.value;
|
26101
26099
|
editor.insertElement(attachmentElement);
|
26102
26100
|
editor.range.anchor.moveToEnd(attachmentElement);
|
26103
26101
|
editor.range.focus.moveToEnd(attachmentElement);
|
@@ -26112,7 +26110,6 @@ const attachment = (options) => {
|
|
26112
26110
|
},
|
26113
26111
|
//找到附件元素点击下载
|
26114
26112
|
updateView: () => {
|
26115
|
-
const editor = editifyInstance.exposed.editor.value;
|
26116
26113
|
AlexElement.flatElements(editor.stack).forEach((el) => {
|
26117
26114
|
if (el.parsedom == "span" && el.hasMarks() && el.marks["data-attachment"]) {
|
26118
26115
|
event.off(el.elm, "click");
|
@@ -26150,7 +26147,7 @@ const attachment = (options) => {
|
|
26150
26147
|
const install = (app) => {
|
26151
26148
|
app.component(Editify.name, Editify);
|
26152
26149
|
};
|
26153
|
-
const version = "0.1.
|
26150
|
+
const version = "0.1.24";
|
26154
26151
|
export {
|
26155
26152
|
AlexElement,
|
26156
26153
|
Editify,
|