vue-editify 0.1.29 → 0.1.30
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/editify.es.js +14 -4
- 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/components/menu/menu.vue +6 -2
- package/src/core/rule.ts +9 -0
- package/src/index.ts +1 -1
- package/src/plugins/attachment/index.ts +2 -2
package/lib/editify.es.js
CHANGED
@@ -19890,6 +19890,14 @@ const preHandle = function(editor, element2, highlight2, languages2) {
|
|
19890
19890
|
newEl.parent = element2;
|
19891
19891
|
});
|
19892
19892
|
updateRangeInPre(editor, element2, originalTextElements, newElements);
|
19893
|
+
} else {
|
19894
|
+
const breakElement = new AlexElement("closed", "br", null, null, null);
|
19895
|
+
element2.children = [breakElement];
|
19896
|
+
breakElement.parent = element2;
|
19897
|
+
if (editor.range) {
|
19898
|
+
editor.range.anchor.moveToStart(breakElement);
|
19899
|
+
editor.range.focus.moveToStart(breakElement);
|
19900
|
+
}
|
19893
19901
|
}
|
19894
19902
|
}
|
19895
19903
|
}
|
@@ -23942,6 +23950,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
23942
23950
|
const value_isRangeInOrderList = isRangeInList(editor.value, dataRangeCaches.value, true);
|
23943
23951
|
const value_isRangeInUnorderList = isRangeInList(editor.value, dataRangeCaches.value, false);
|
23944
23952
|
const value_isRangeInTask = isRangeInTask(editor.value, dataRangeCaches.value);
|
23953
|
+
const value_hasImageInRange = hasImageInRange(editor.value, dataRangeCaches.value);
|
23954
|
+
const value_hasVideoInRange = hasVideoInRange(editor.value, dataRangeCaches.value);
|
23945
23955
|
const extraDisabled = (name) => {
|
23946
23956
|
let pluginDisabled = false;
|
23947
23957
|
let length = pluginResultList.value.length;
|
@@ -24063,7 +24073,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
24063
24073
|
videoConfig.value.disabled = value_hasPreInRange || extraDisabled("video");
|
24064
24074
|
tableConfig.value.disabled = value_hasPreInRange || value_hasTableInRange || value_hasQuoteInRange || extraDisabled("table");
|
24065
24075
|
codeBlockConfig.value.active = !!getCurrentParsedomElement(editor.value, dataRangeCaches.value, "pre");
|
24066
|
-
codeBlockConfig.value.disabled = value_hasTableInRange || value_hasQuoteInRange || extraDisabled("codeBlock");
|
24076
|
+
codeBlockConfig.value.disabled = value_hasTableInRange || value_hasQuoteInRange || value_hasImageInRange || value_hasVideoInRange || extraDisabled("codeBlock");
|
24067
24077
|
sourceViewConfig.value.active = isSourceView.value;
|
24068
24078
|
fullScreenConfig.value.active = isFullScreen.value;
|
24069
24079
|
};
|
@@ -24758,7 +24768,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
24758
24768
|
};
|
24759
24769
|
}
|
24760
24770
|
});
|
24761
|
-
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
24771
|
+
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-fbf50ae5"]]);
|
24762
24772
|
const EditifyProps = {
|
24763
24773
|
//国际化语言类型
|
24764
24774
|
locale: {
|
@@ -26125,7 +26135,7 @@ const attachment = (options) => {
|
|
26125
26135
|
menu: {
|
26126
26136
|
sequence: options.sequence || 100,
|
26127
26137
|
extraDisabled: (name) => {
|
26128
|
-
if (name == "link" || name == "quote") {
|
26138
|
+
if (name == "link" || name == "quote" || name == "codeBlock") {
|
26129
26139
|
return hasAttachmentInRange(editifyInstance.exposed.editor.value, editifyInstance.exposed.dataRangeCaches.value);
|
26130
26140
|
}
|
26131
26141
|
return false;
|
@@ -26232,7 +26242,7 @@ const attachment = (options) => {
|
|
26232
26242
|
const install = (app) => {
|
26233
26243
|
app.component(Editify.name, Editify);
|
26234
26244
|
};
|
26235
|
-
const version = "0.1.
|
26245
|
+
const version = "0.1.30";
|
26236
26246
|
console.log(`%c vue-editify %c v${version} `, "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;", "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");
|
26237
26247
|
export {
|
26238
26248
|
AlexElement,
|