vue-editify 0.1.20 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/examples/App.vue +5 -32
- package/examples/test.html +32 -0
- package/lib/core/tool.d.ts +35 -35
- package/lib/editify.es.js +35 -44
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +10 -15
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/button/button.less +6 -6
- package/src/components/button/button.vue +4 -4
- package/src/components/checkbox/checkbox.less +4 -4
- package/src/components/checkbox/checkbox.vue +2 -2
- package/src/components/colors/colors.less +1 -1
- package/src/components/colors/colors.vue +1 -1
- package/src/components/insertImage/insertImage.less +3 -3
- package/src/components/insertImage/insertImage.vue +3 -3
- package/src/components/insertTable/insertTable.less +1 -1
- package/src/components/insertTable/insertTable.vue +1 -1
- package/src/components/insertVideo/insertVideo.less +3 -3
- package/src/components/insertVideo/insertVideo.vue +3 -3
- package/src/components/layer/layer.less +1 -1
- package/src/components/layer/layer.vue +1 -1
- package/src/components/menu/menu.less +4 -4
- package/src/components/menu/menu.vue +2 -2
- package/src/components/tooltip/tooltip.less +1 -1
- package/src/components/tooltip/tooltip.vue +1 -1
- package/src/core/tool.ts +35 -35
- package/src/editify/editify.less +12 -11
- package/src/editify/editify.vue +5 -5
- package/src/index.ts +20 -24
package/examples/App.vue
CHANGED
@@ -1,40 +1,23 @@
|
|
1
1
|
<template>
|
2
2
|
<div style="padding: 10px; height: 100%; box-sizing: border-box">
|
3
|
-
<Editify ref="editify" border v-model="val" :menu="menuConfig" style="height: 100%" placeholder="Please Enter Text..." locale="zh_CN"
|
3
|
+
<Editify ref="editify" border v-model="val" :menu="menuConfig" style="height: 100%" placeholder="Please Enter Text..." locale="zh_CN"></Editify>
|
4
4
|
</div>
|
5
5
|
</template>
|
6
6
|
<script setup lang="ts">
|
7
|
-
import { ref } from 'vue'
|
8
|
-
import { AlexElement,
|
9
|
-
import { MenuConfigType } from '../src/index'
|
7
|
+
import { h, ref } from 'vue'
|
8
|
+
import { AlexElement, MenuConfigType, Editify } from '../src/index'
|
10
9
|
const val = ref<string>('<p><br></p>')
|
11
10
|
const editify = ref<InstanceType<typeof Editify> | null>(null)
|
12
11
|
const menuConfig = ref<MenuConfigType>({
|
13
12
|
use: true,
|
14
13
|
mode: 'inner',
|
15
|
-
|
16
|
-
|
17
|
-
handleError: (error, file) => {
|
18
|
-
console.log(error, file)
|
19
|
-
}
|
14
|
+
sourceView: {
|
15
|
+
show: true
|
20
16
|
},
|
21
17
|
fullScreen: {
|
22
18
|
show: true
|
23
19
|
}
|
24
20
|
})
|
25
|
-
const customTextPaste = function (data: string) {
|
26
|
-
const text = new AlexElement(
|
27
|
-
'text',
|
28
|
-
null,
|
29
|
-
null,
|
30
|
-
{
|
31
|
-
color: 'red',
|
32
|
-
'font-weight': 'bold'
|
33
|
-
},
|
34
|
-
data
|
35
|
-
)
|
36
|
-
editify.value!.editor!.insertElement(text)
|
37
|
-
}
|
38
21
|
</script>
|
39
22
|
<style lang="less">
|
40
23
|
html,
|
@@ -49,14 +32,4 @@ body {
|
|
49
32
|
height: 100%;
|
50
33
|
overflow: auto;
|
51
34
|
}
|
52
|
-
|
53
|
-
span[data-zip] {
|
54
|
-
display: inline-block;
|
55
|
-
width: 40px;
|
56
|
-
height: 40px;
|
57
|
-
background: url(https://www.ling0523.cn/images/image_0_1702456046669.png) no-repeat center;
|
58
|
-
background-size: cover;
|
59
|
-
cursor: pointer;
|
60
|
-
margin: 0 10px;
|
61
|
-
}
|
62
35
|
</style>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<title>Document</title>
|
8
|
+
<link rel="stylesheet" href="../lib/style.css">
|
9
|
+
<script src="../node_modules/vue/dist/vue.global.prod.js"></script>
|
10
|
+
<script src="../lib/editify.umd.js"></script>
|
11
|
+
</head>
|
12
|
+
|
13
|
+
<body>
|
14
|
+
<div id="app">
|
15
|
+
<editify v-model="value" placeholder="请输入"></editify>
|
16
|
+
</div>
|
17
|
+
</body>
|
18
|
+
<script>
|
19
|
+
const { createApp } = Vue
|
20
|
+
const app = createApp({
|
21
|
+
data() {
|
22
|
+
return {
|
23
|
+
value: '<p><br></p>'
|
24
|
+
}
|
25
|
+
}
|
26
|
+
})
|
27
|
+
console.log(editify.version)
|
28
|
+
app.use(editify)
|
29
|
+
app.mount('#app')
|
30
|
+
</script>
|
31
|
+
|
32
|
+
</html>
|
package/lib/core/tool.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { default as Button } from '../components/button/button.vue';
|
2
|
-
import {
|
2
|
+
import { VNode } from 'vue';
|
3
3
|
import { InsertImageUploadErrorType } from '../components/insertImage/props';
|
4
4
|
import { LocaleType } from '../locale';
|
5
5
|
import { ButtonOptionsItemType, ButtonTypeType } from '../components/button/props';
|
@@ -52,7 +52,7 @@ export interface MenuTableButtonType extends MenuButtonType {
|
|
52
52
|
maxColumns?: number;
|
53
53
|
}
|
54
54
|
export type MenuCustomButtonType = {
|
55
|
-
type
|
55
|
+
type?: ButtonTypeType;
|
56
56
|
title?: string;
|
57
57
|
leftBorder?: boolean;
|
58
58
|
rightBorder?: boolean;
|
@@ -67,9 +67,9 @@ export type MenuCustomButtonType = {
|
|
67
67
|
onLayerShown?: (name: string, btnInstance: InstanceType<typeof Button>) => void;
|
68
68
|
onLayerHidden?: (name: string, btnInstance: InstanceType<typeof Button>) => void;
|
69
69
|
onOperate?: (name: string, value: string | number | undefined, btnInstance: InstanceType<typeof Button>) => void;
|
70
|
-
default?:
|
71
|
-
layer?:
|
72
|
-
option?:
|
70
|
+
default?: () => VNode;
|
71
|
+
layer?: () => VNode;
|
72
|
+
option?: () => VNode;
|
73
73
|
};
|
74
74
|
export type CodeBlockToolbarType = {
|
75
75
|
languages?: MenuSelectButtonType;
|
@@ -103,36 +103,36 @@ export type ToolbarConfigType = {
|
|
103
103
|
extraDisabled?: ((name: string) => boolean) | null;
|
104
104
|
};
|
105
105
|
export type MenuSequenceType = {
|
106
|
-
[key: string]: number;
|
107
|
-
undo
|
108
|
-
redo
|
109
|
-
heading
|
110
|
-
indent
|
111
|
-
quote
|
112
|
-
align
|
113
|
-
orderList
|
114
|
-
unorderList
|
115
|
-
task
|
116
|
-
bold
|
117
|
-
underline
|
118
|
-
italic
|
119
|
-
strikethrough
|
120
|
-
code
|
121
|
-
super
|
122
|
-
sub
|
123
|
-
formatClear
|
124
|
-
fontSize
|
125
|
-
fontFamily
|
126
|
-
lineHeight
|
127
|
-
foreColor
|
128
|
-
backColor
|
129
|
-
link
|
130
|
-
image
|
131
|
-
video
|
132
|
-
table
|
133
|
-
codeBlock
|
134
|
-
sourceView
|
135
|
-
fullScreen
|
106
|
+
[key: string]: number | undefined;
|
107
|
+
undo?: number;
|
108
|
+
redo?: number;
|
109
|
+
heading?: number;
|
110
|
+
indent?: number;
|
111
|
+
quote?: number;
|
112
|
+
align?: number;
|
113
|
+
orderList?: number;
|
114
|
+
unorderList?: number;
|
115
|
+
task?: number;
|
116
|
+
bold?: number;
|
117
|
+
underline?: number;
|
118
|
+
italic?: number;
|
119
|
+
strikethrough?: number;
|
120
|
+
code?: number;
|
121
|
+
super?: number;
|
122
|
+
sub?: number;
|
123
|
+
formatClear?: number;
|
124
|
+
fontSize?: number;
|
125
|
+
fontFamily?: number;
|
126
|
+
lineHeight?: number;
|
127
|
+
foreColor?: number;
|
128
|
+
backColor?: number;
|
129
|
+
link?: number;
|
130
|
+
image?: number;
|
131
|
+
video?: number;
|
132
|
+
table?: number;
|
133
|
+
codeBlock?: number;
|
134
|
+
sourceView?: number;
|
135
|
+
fullScreen?: number;
|
136
136
|
};
|
137
137
|
export type MenuModeType = 'default' | 'inner' | 'fixed';
|
138
138
|
export type MenuConfigType = {
|
package/lib/editify.es.js
CHANGED
@@ -20613,7 +20613,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
20613
20613
|
createElementVNode("div", {
|
20614
20614
|
ref_key: "wrapRef",
|
20615
20615
|
ref: wrapRef,
|
20616
|
-
class: normalizeClass(["editify-layer-wrap", { border: _ctx.border }]),
|
20616
|
+
class: normalizeClass(["editify-layer-wrap", { "editify-border": _ctx.border }]),
|
20617
20617
|
style: normalizeStyle(wrapStyle.value)
|
20618
20618
|
}, [
|
20619
20619
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
@@ -20625,7 +20625,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
20625
20625
|
};
|
20626
20626
|
}
|
20627
20627
|
});
|
20628
|
-
const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
20628
|
+
const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-09578d83"]]);
|
20629
20629
|
const TooltipProps = {
|
20630
20630
|
//提示内容
|
20631
20631
|
content: {
|
@@ -20668,7 +20668,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
20668
20668
|
};
|
20669
20669
|
return (_ctx, _cache) => {
|
20670
20670
|
return openBlock(), createElementBlock("div", {
|
20671
|
-
class: normalizeClass(["editify-tooltip", { block: _ctx.block }])
|
20671
|
+
class: normalizeClass(["editify-tooltip", { "editify-block": _ctx.block }])
|
20672
20672
|
}, [
|
20673
20673
|
createElementVNode("div", {
|
20674
20674
|
ref_key: "targetRef",
|
@@ -20701,7 +20701,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
20701
20701
|
};
|
20702
20702
|
}
|
20703
20703
|
});
|
20704
|
-
const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
20704
|
+
const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-7b5e30d1"]]);
|
20705
20705
|
const IconProps = {
|
20706
20706
|
//图标值
|
20707
20707
|
value: {
|
@@ -20953,7 +20953,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
20953
20953
|
return (_ctx, _cache) => {
|
20954
20954
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
20955
20955
|
createElementVNode("div", {
|
20956
|
-
class: normalizeClass(["editify-button-wrap", { "right-border": _ctx.rightBorder, "left-border": _ctx.leftBorder }])
|
20956
|
+
class: normalizeClass(["editify-button-wrap", { "editify-right-border": _ctx.rightBorder, "editify-left-border": _ctx.leftBorder }])
|
20957
20957
|
}, [
|
20958
20958
|
createVNode(Tooltip, {
|
20959
20959
|
content: _ctx.title,
|
@@ -20964,7 +20964,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
20964
20964
|
ref_key: "btnRef",
|
20965
20965
|
ref: btnRef,
|
20966
20966
|
style: normalizeStyle(btnStyle.value),
|
20967
|
-
class: normalizeClass(["editify-button-el", { disabled: _ctx.disabled, active: _ctx.active }]),
|
20967
|
+
class: normalizeClass(["editify-button-el", { "editify-disabled": _ctx.disabled, "editify-active": _ctx.active }]),
|
20968
20968
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => status.value = "hover"),
|
20969
20969
|
onMouseleave: _cache[1] || (_cache[1] = ($event) => status.value = null),
|
20970
20970
|
onMousedown: _cache[2] || (_cache[2] = ($event) => status.value = "down"),
|
@@ -20977,7 +20977,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
20977
20977
|
_ctx.type == "select" || _ctx.type == "display" ? (openBlock(), createBlock(Icon, {
|
20978
20978
|
key: 2,
|
20979
20979
|
value: "caret-down",
|
20980
|
-
class: normalizeClass(["editify-button-caret", { rotate: show.value }])
|
20980
|
+
class: normalizeClass(["editify-button-caret", { "editify-rotate": show.value }])
|
20981
20981
|
}, null, 8, ["class"])) : createCommentVNode("", true)
|
20982
20982
|
], 38)
|
20983
20983
|
]),
|
@@ -21010,7 +21010,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
21010
21010
|
(openBlock(true), createElementBlock(Fragment, null, renderList(cmpOptions.value, (item) => {
|
21011
21011
|
return openBlock(), createElementBlock("div", {
|
21012
21012
|
onClick: ($event) => select(item),
|
21013
|
-
class: normalizeClass(["editify-button-option", { active: _ctx.type == "display" ? item.value == parseDisplayConfig.value.value : false }]),
|
21013
|
+
class: normalizeClass(["editify-button-option", { "editify-active": _ctx.type == "display" ? item.value == parseDisplayConfig.value.value : false }]),
|
21014
21014
|
style: normalizeStyle(item.style || "")
|
21015
21015
|
}, [
|
21016
21016
|
_ctx.$slots.option ? renderSlot(_ctx.$slots, "option", {
|
@@ -21035,7 +21035,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
21035
21035
|
};
|
21036
21036
|
}
|
21037
21037
|
});
|
21038
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
21038
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-3656b737"]]);
|
21039
21039
|
const CheckboxProps = {
|
21040
21040
|
//是否禁用
|
21041
21041
|
disabled: {
|
@@ -21130,7 +21130,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
21130
21130
|
};
|
21131
21131
|
return (_ctx, _cache) => {
|
21132
21132
|
return openBlock(), createElementBlock("label", {
|
21133
|
-
class: normalizeClass(["editify-checkbox", { disabled: _ctx.disabled }])
|
21133
|
+
class: normalizeClass(["editify-checkbox", { "editify-disabled": _ctx.disabled }])
|
21134
21134
|
}, [
|
21135
21135
|
_ctx.placement == "left" && _ctx.label ? (openBlock(), createElementBlock("span", {
|
21136
21136
|
key: 0,
|
@@ -21146,7 +21146,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
21146
21146
|
type: "checkbox"
|
21147
21147
|
}, null, 40, _hoisted_2$7),
|
21148
21148
|
createElementVNode("span", {
|
21149
|
-
class: normalizeClass(["editify-checkbox-item", { reverse: !_ctx.color, round: _ctx.round, checked: check.value && !_ctx.disabled }]),
|
21149
|
+
class: normalizeClass(["editify-checkbox-item", { "editify-reverse": !_ctx.color, "editify-round": _ctx.round, "editify-checked": check.value && !_ctx.disabled }]),
|
21150
21150
|
style: normalizeStyle(itemStyle.value)
|
21151
21151
|
}, [
|
21152
21152
|
createVNode(Icon, {
|
@@ -21164,7 +21164,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
21164
21164
|
};
|
21165
21165
|
}
|
21166
21166
|
});
|
21167
|
-
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
21167
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-d99c609b"]]);
|
21168
21168
|
const ColorsProps = {
|
21169
21169
|
//颜色数组
|
21170
21170
|
data: {
|
@@ -21217,7 +21217,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
21217
21217
|
createElementVNode("div", _hoisted_2$6, [
|
21218
21218
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (item) => {
|
21219
21219
|
return openBlock(), createElementBlock("div", {
|
21220
|
-
class: normalizeClass(["editify-color", { active: _ctx.value == item.value }]),
|
21220
|
+
class: normalizeClass(["editify-color", { "editify-active": _ctx.value == item.value }]),
|
21221
21221
|
style: normalizeStyle({ borderColor: _ctx.value == item.value ? _ctx.color : "" })
|
21222
21222
|
}, [
|
21223
21223
|
createVNode(Tooltip, {
|
@@ -21241,7 +21241,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
21241
21241
|
};
|
21242
21242
|
}
|
21243
21243
|
});
|
21244
|
-
const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
21244
|
+
const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-514d2263"]]);
|
21245
21245
|
const ToolbarProps = {
|
21246
21246
|
//是否显示
|
21247
21247
|
modelValue: {
|
@@ -23026,16 +23026,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
23026
23026
|
createElementVNode("div", _hoisted_2$3, [
|
23027
23027
|
createElementVNode("div", {
|
23028
23028
|
onClick: _cache[0] || (_cache[0] = ($event) => current.value = "upload"),
|
23029
|
-
class: normalizeClass(["editify-image-header-item", { active: current.value == "upload" }]),
|
23029
|
+
class: normalizeClass(["editify-image-header-item", { "editify-active": current.value == "upload" }]),
|
23030
23030
|
style: normalizeStyle(activeStyle.value("upload"))
|
23031
23031
|
}, toDisplayString(unref($editTrans)("uploadImage")), 7),
|
23032
23032
|
createElementVNode("div", {
|
23033
23033
|
onClick: _cache[1] || (_cache[1] = ($event) => current.value = "remote"),
|
23034
|
-
class: normalizeClass(["editify-image-header-item", { active: current.value == "remote" }]),
|
23034
|
+
class: normalizeClass(["editify-image-header-item", { "editify-active": current.value == "remote" }]),
|
23035
23035
|
style: normalizeStyle(activeStyle.value("remote"))
|
23036
23036
|
}, toDisplayString(unref($editTrans)("remoteImage")), 7),
|
23037
23037
|
createElementVNode("div", {
|
23038
|
-
class: normalizeClass(["editify-image-header-slider", current.value]),
|
23038
|
+
class: normalizeClass(["editify-image-header-slider", "editify-" + current.value]),
|
23039
23039
|
style: normalizeStyle({ backgroundColor: _ctx.color || "" })
|
23040
23040
|
}, null, 6)
|
23041
23041
|
]),
|
@@ -23072,7 +23072,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
23072
23072
|
};
|
23073
23073
|
}
|
23074
23074
|
});
|
23075
|
-
const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
23075
|
+
const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-735f42e9"]]);
|
23076
23076
|
const InsertVideoProps = {
|
23077
23077
|
//主题色
|
23078
23078
|
color: {
|
@@ -23224,16 +23224,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
23224
23224
|
createElementVNode("div", _hoisted_2$2, [
|
23225
23225
|
createElementVNode("div", {
|
23226
23226
|
onClick: _cache[0] || (_cache[0] = ($event) => current.value = "upload"),
|
23227
|
-
class: normalizeClass(["editify-video-header-item", { active: current.value == "upload" }]),
|
23227
|
+
class: normalizeClass(["editify-video-header-item", { "editify-active": current.value == "upload" }]),
|
23228
23228
|
style: normalizeStyle(activeStyle.value("upload"))
|
23229
23229
|
}, toDisplayString(unref($editTrans)("uploadVideo")), 7),
|
23230
23230
|
createElementVNode("div", {
|
23231
23231
|
onClick: _cache[1] || (_cache[1] = ($event) => current.value = "remote"),
|
23232
|
-
class: normalizeClass(["editify-video-header-item", { active: current.value == "remote" }]),
|
23232
|
+
class: normalizeClass(["editify-video-header-item", { "editify-active": current.value == "remote" }]),
|
23233
23233
|
style: normalizeStyle(activeStyle.value("remote"))
|
23234
23234
|
}, toDisplayString(unref($editTrans)("remoteVideo")), 7),
|
23235
23235
|
createElementVNode("div", {
|
23236
|
-
class: normalizeClass(["editify-video-header-slider", current.value]),
|
23236
|
+
class: normalizeClass(["editify-video-header-slider", "editify-" + current.value]),
|
23237
23237
|
style: normalizeStyle({ backgroundColor: _ctx.color || "" })
|
23238
23238
|
}, null, 6)
|
23239
23239
|
]),
|
@@ -23270,7 +23270,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
23270
23270
|
};
|
23271
23271
|
}
|
23272
23272
|
});
|
23273
|
-
const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
23273
|
+
const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4d375427"]]);
|
23274
23274
|
const InsertTableProps = {
|
23275
23275
|
//主题色
|
23276
23276
|
color: {
|
@@ -23288,7 +23288,7 @@ const InsertTableProps = {
|
|
23288
23288
|
default: 10
|
23289
23289
|
}
|
23290
23290
|
};
|
23291
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
23291
|
+
const _withScopeId = (n) => (pushScopeId("data-v-9a40c4f5"), n = n(), popScopeId(), n);
|
23292
23292
|
const _hoisted_1$2 = { class: "editify-table" };
|
23293
23293
|
const _hoisted_2$1 = ["onMouseenter", "onClick"];
|
23294
23294
|
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, null, -1));
|
@@ -23364,7 +23364,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
23364
23364
|
return openBlock(), createElementBlock("tr", null, [
|
23365
23365
|
(openBlock(true), createElementBlock(Fragment, null, renderList(row, (column) => {
|
23366
23366
|
return openBlock(), createElementBlock("td", {
|
23367
|
-
class: normalizeClass({ inside: column.inside }),
|
23367
|
+
class: normalizeClass({ "editify-inside": column.inside }),
|
23368
23368
|
onMouseenter: ($event) => changeTableSize(column),
|
23369
23369
|
onClick: ($event) => createTable(column)
|
23370
23370
|
}, _hoisted_4$1, 42, _hoisted_2$1);
|
@@ -23379,7 +23379,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
23379
23379
|
};
|
23380
23380
|
}
|
23381
23381
|
});
|
23382
|
-
const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
23382
|
+
const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9a40c4f5"]]);
|
23383
23383
|
const MenuProps = {
|
23384
23384
|
//菜单栏配置
|
23385
23385
|
config: {
|
@@ -24707,7 +24707,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
24707
24707
|
});
|
24708
24708
|
return (_ctx, _cache) => {
|
24709
24709
|
return openBlock(), createElementBlock("div", {
|
24710
|
-
class: normalizeClass(["editify-menu", { border: menuShowBorder.value, source: unref(isSourceView) && menuMode.value == "inner", fullscreen: unref(isFullScreen) }]),
|
24710
|
+
class: normalizeClass(["editify-menu", { "editify-border": menuShowBorder.value, "editify-source": unref(isSourceView) && menuMode.value == "inner", "editify-fullscreen": unref(isFullScreen) }]),
|
24711
24711
|
"data-editify-mode": menuMode.value,
|
24712
24712
|
style: normalizeStyle(_ctx.config.style || "")
|
24713
24713
|
}, [
|
@@ -24721,7 +24721,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
24721
24721
|
};
|
24722
24722
|
}
|
24723
24723
|
});
|
24724
|
-
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
24724
|
+
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-67392864"]]);
|
24725
24725
|
const EditifyProps = {
|
24726
24726
|
//国际化语言类型
|
24727
24727
|
locale: {
|
@@ -25693,7 +25693,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25693
25693
|
});
|
25694
25694
|
return (_ctx, _cache) => {
|
25695
25695
|
return openBlock(), createElementBlock("div", {
|
25696
|
-
class: normalizeClass(["editify", { fullscreen: isFullScreen.value, autoheight: !isFullScreen.value && _ctx.autoheight }]),
|
25696
|
+
class: normalizeClass(["editify", { "editify-fullscreen": isFullScreen.value, "editify-autoheight": !isFullScreen.value && _ctx.autoheight }]),
|
25697
25697
|
ref_key: "elRef",
|
25698
25698
|
ref: elRef
|
25699
25699
|
}, [
|
@@ -25707,13 +25707,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25707
25707
|
createElementVNode("div", {
|
25708
25708
|
ref_key: "bodyRef",
|
25709
25709
|
ref: bodyRef,
|
25710
|
-
class: normalizeClass(["editify-body", { border: showBorder.value, menu_inner: menuConfig.value.use && menuConfig.value.mode == "inner" }]),
|
25710
|
+
class: normalizeClass(["editify-body", { "editify-border": showBorder.value, "editify-menu_inner": menuConfig.value.use && menuConfig.value.mode == "inner" }]),
|
25711
25711
|
"data-editify-uid": unref(instance).uid
|
25712
25712
|
}, [
|
25713
25713
|
createElementVNode("div", {
|
25714
25714
|
ref_key: "contentRef",
|
25715
25715
|
ref: contentRef,
|
25716
|
-
class: normalizeClass(["editify-content", { placeholder: showPlaceholder.value, disabled: _ctx.disabled }]),
|
25716
|
+
class: normalizeClass(["editify-content", { "editify-placeholder": showPlaceholder.value, "editify-disabled": _ctx.disabled }]),
|
25717
25717
|
onKeydown: handleEditorKeydown,
|
25718
25718
|
onClick: handleEditorClick,
|
25719
25719
|
onCompositionstart: _cache[0] || (_cache[0] = ($event) => isInputChinese.value = true),
|
@@ -25724,7 +25724,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25724
25724
|
key: 0,
|
25725
25725
|
value: value.value,
|
25726
25726
|
readonly: "",
|
25727
|
-
class: "editify-
|
25727
|
+
class: "editify-sourceview"
|
25728
25728
|
}, null, 8, _hoisted_3)) : createCommentVNode("", true),
|
25729
25729
|
createVNode(Toolbar, {
|
25730
25730
|
ref_key: "toolbarRef",
|
@@ -25739,7 +25739,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25739
25739
|
], 10, _hoisted_1),
|
25740
25740
|
_ctx.showWordLength ? (openBlock(), createElementBlock("div", {
|
25741
25741
|
key: 1,
|
25742
|
-
class: normalizeClass(["editify-footer", { fullscreen: isFullScreen.value && !isSourceView.value }]),
|
25742
|
+
class: normalizeClass(["editify-footer", { "editify-fullscreen": isFullScreen.value && !isSourceView.value }]),
|
25743
25743
|
ref_key: "footerRef",
|
25744
25744
|
ref: footerRef
|
25745
25745
|
}, [
|
@@ -25749,26 +25749,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25749
25749
|
};
|
25750
25750
|
}
|
25751
25751
|
});
|
25752
|
-
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
25753
|
-
const version = "0.1.
|
25752
|
+
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3f87ab8c"]]);
|
25753
|
+
const version = "0.1.22";
|
25754
25754
|
const install = (app) => {
|
25755
25755
|
app.component(Editify.name, Editify);
|
25756
25756
|
};
|
25757
|
-
const stdin_default = {
|
25758
|
-
install,
|
25759
|
-
version
|
25760
|
-
};
|
25761
25757
|
export {
|
25762
25758
|
AlexElement,
|
25763
25759
|
Editify,
|
25764
|
-
|
25760
|
+
install as default,
|
25765
25761
|
elementIsInList,
|
25766
25762
|
elementIsInTask,
|
25767
|
-
elementToList,
|
25768
|
-
elementToParagraph,
|
25769
|
-
elementToTask,
|
25770
25763
|
getCurrentParsedomElement,
|
25771
|
-
getFlatElementsByRange,
|
25772
25764
|
getParsedomElementByElement,
|
25773
25765
|
getRangeText,
|
25774
25766
|
hasImageInRange,
|
@@ -25796,7 +25788,6 @@ export {
|
|
25796
25788
|
removeTextMark,
|
25797
25789
|
removeTextStyle,
|
25798
25790
|
setAlign,
|
25799
|
-
setHeading,
|
25800
25791
|
setIndentDecrease,
|
25801
25792
|
setIndentIncrease,
|
25802
25793
|
setLineHeight,
|