vue-editify 0.2.16 → 0.2.18

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.
Files changed (60) hide show
  1. package/examples/App.vue +289 -5
  2. package/lib/components/colors/colors.vue.d.ts +9 -0
  3. package/lib/components/colors/props.d.ts +4 -0
  4. package/lib/core/function.d.ts +120 -45
  5. package/lib/core/rule.d.ts +23 -17
  6. package/lib/core/tool.d.ts +1 -13
  7. package/lib/editify/editify.vue.d.ts +10 -1
  8. package/lib/editify/props.d.ts +1 -1
  9. package/lib/editify/toolbar/props.d.ts +1 -1
  10. package/lib/editify/toolbar/toolbar.vue.d.ts +3 -3
  11. package/lib/editify.es.js +13640 -13799
  12. package/lib/editify.umd.js +2 -2
  13. package/lib/feature/align.d.ts +0 -14
  14. package/lib/feature/heading.d.ts +0 -14
  15. package/lib/feature/lineHeight.d.ts +0 -14
  16. package/lib/feature/orderList.d.ts +1 -3
  17. package/lib/feature/task.d.ts +0 -14
  18. package/lib/feature/unorderList.d.ts +1 -3
  19. package/lib/index.d.ts +12 -3
  20. package/package.json +2 -2
  21. package/src/components/button/button.vue +3 -3
  22. package/src/components/checkbox/checkbox.vue +1 -1
  23. package/src/components/colors/colors.vue +4 -4
  24. package/src/components/colors/props.ts +6 -1
  25. package/src/components/insertAttachment/insertAttachment.vue +1 -1
  26. package/src/components/insertImage/insertImage.vue +1 -1
  27. package/src/components/insertLink/insertLink.vue +1 -1
  28. package/src/components/insertVideo/insertVideo.vue +1 -1
  29. package/src/components/layer/layer.vue +9 -3
  30. package/src/components/tooltip/tooltip.vue +1 -1
  31. package/src/components/updateLink/updateLink.vue +1 -1
  32. package/src/core/function.ts +961 -475
  33. package/src/core/rule.ts +85 -367
  34. package/src/core/tool.ts +8 -114
  35. package/src/editify/editify.less +88 -14
  36. package/src/editify/editify.vue +117 -65
  37. package/src/editify/props.ts +1 -1
  38. package/src/editify/toolbar/props.ts +2 -2
  39. package/src/editify/toolbar/toolbar.vue +12 -12
  40. package/src/feature/align.ts +1 -61
  41. package/src/feature/attachment.ts +13 -26
  42. package/src/feature/backColor.ts +1 -0
  43. package/src/feature/foreColor.ts +1 -0
  44. package/src/feature/heading.ts +2 -73
  45. package/src/feature/infoBlock.ts +4 -35
  46. package/src/feature/lineHeight.ts +1 -77
  47. package/src/feature/mathformula.ts +3 -50
  48. package/src/feature/orderList.ts +166 -35
  49. package/src/feature/panel.ts +4 -49
  50. package/src/feature/sub.ts +1 -1
  51. package/src/feature/super.ts +1 -1
  52. package/src/feature/task.ts +1 -55
  53. package/src/feature/unorderList.ts +106 -35
  54. package/src/feature/video.ts +1 -1
  55. package/src/icon/iconfont.css +40 -0
  56. package/src/icon/iconfont.ttf +0 -0
  57. package/src/icon/iconfont.woff +0 -0
  58. package/src/index.ts +14 -8
  59. package/src/locale/en_US.ts +112 -110
  60. package/src/locale/zh_CN.ts +11 -9
@@ -1,7 +1,7 @@
1
- import { defineComponent, h, inject, PropType, Ref, ref } from 'vue'
2
- import { AlexElementsRangeType, AlexEditor } from 'alex-editor'
1
+ import { computed, defineComponent, h, inject, PropType, Ref } from 'vue'
2
+ import { AlexElementsRangeType, AlexEditor, AlexElement } from 'alex-editor'
3
3
  import { MenuButtonType } from '@/core/tool'
4
- import { hasPanelInRange, hasPreInRange, hasTableInRange, rangeIsInList, setList } from '@/core/function'
4
+ import { elementIsList, getMatchElementByRange, hasPanelInRange, hasPreInRange, hasTableInRange, rangeIsInList, setList } from '@/core/function'
5
5
  import { Button } from '@/components/button'
6
6
  import { Icon } from '@/components/icon'
7
7
 
@@ -10,47 +10,179 @@ import { Icon } from '@/components/icon'
10
10
  */
11
11
  const FEATURE_NAME = 'orderList'
12
12
 
13
+ type orderType = 'decimal' | 'lower-roman' | 'upper-roman' | 'lower-alpha' | 'upper-alpha' | 'lower-greek' | 'cjk-ideographic'
14
+
13
15
  /**
14
16
  * 工具栏 - 有序列表
15
17
  */
16
- export const OrderListToolbarButton = defineComponent(
17
- (props, { expose }) => {
18
+ export const OrderListToolbar = defineComponent(
19
+ props => {
18
20
  const editor = inject<Ref<AlexEditor>>('editor')!
19
21
  const dataRangeCaches = inject<Ref<AlexElementsRangeType>>('dataRangeCaches')!
20
22
  const $editTrans = inject<(key: string) => any>('$editTrans')!
21
23
 
22
- const btnRef = ref<InstanceType<typeof Button> | null>(null)
23
-
24
- expose({
25
- btnRef
24
+ const active = computed<(val: orderType) => boolean>(() => {
25
+ return val => {
26
+ const el = getMatchElementByRange(editor.value, dataRangeCaches.value, {
27
+ parsedom: 'div',
28
+ marks: {
29
+ 'data-editify-list': 'ol'
30
+ }
31
+ })
32
+ if (el && el.marks!['data-editify-list-style']) {
33
+ return el.marks!['data-editify-list-style'] == val
34
+ }
35
+ return val == 'decimal'
36
+ }
26
37
  })
27
38
 
39
+ //设置前面列表的序标样式
40
+ const setPreviouseListStyle = (element: AlexElement, val: orderType) => {
41
+ element.marks!['data-editify-list-style'] = val
42
+ const previousElement = editor.value.getPreviousElement(element)
43
+ if (previousElement && elementIsList(previousElement, true)) {
44
+ setPreviouseListStyle(previousElement, val)
45
+ }
46
+ }
47
+
48
+ //设置后面列表的序标样式
49
+ const setNextListStyle = (element: AlexElement, val: orderType) => {
50
+ element.marks!['data-editify-list-style'] = val
51
+ const nextElement = editor.value.getNextElement(element)
52
+ if (nextElement && elementIsList(nextElement, true)) {
53
+ setNextListStyle(nextElement, val)
54
+ }
55
+ }
56
+
57
+ //设置列表序标样式
58
+ const setListStyle = (val: orderType) => {
59
+ const el = getMatchElementByRange(editor.value, dataRangeCaches.value, {
60
+ parsedom: 'div',
61
+ marks: {
62
+ 'data-editify-list': 'ol'
63
+ }
64
+ })!
65
+ el.marks!['data-editify-list-style'] = val
66
+ const previousElement = editor.value.getPreviousElement(el)
67
+ const nextElement = editor.value.getNextElement(el)
68
+ if (previousElement && elementIsList(previousElement, true)) {
69
+ setPreviouseListStyle(previousElement, val)
70
+ }
71
+ if (nextElement && elementIsList(nextElement, true)) {
72
+ setNextListStyle(nextElement, val)
73
+ }
74
+ editor.value.domRender()
75
+ editor.value.rangeRender()
76
+ }
77
+
28
78
  return () => {
29
- return props.config.show
30
- ? h(
31
- Button,
32
- {
33
- ref: btnRef,
34
- name: FEATURE_NAME,
35
- title: $editTrans('orderList'),
36
- tooltip: props.tooltip,
37
- color: props.color,
38
- zIndex: props.zIndex,
39
- leftBorder: props.config.leftBorder,
40
- rightBorder: props.config.rightBorder,
41
- active: rangeIsInList(editor.value, dataRangeCaches.value, true),
42
- disabled: props.config.disabled,
43
- onOperate: () => {
44
- setList(editor.value, dataRangeCaches.value, true)
45
- editor.value.domRender()
46
- editor.value.rangeRender()
47
- }
48
- },
49
- {
50
- default: () => h(Icon, { value: 'list-ordered' })
51
- }
52
- )
53
- : null
79
+ return [
80
+ h(
81
+ Button,
82
+ {
83
+ name: 'decimal',
84
+ title: $editTrans('decimal'),
85
+ tooltip: props.tooltip,
86
+ color: props.color,
87
+ zIndex: props.zIndex,
88
+ active: active.value('decimal'),
89
+ onOperate: () => setListStyle('decimal')
90
+ },
91
+ {
92
+ default: () => h(Icon, { value: 'list-decimal', style: { fontSize: '18px' } })
93
+ }
94
+ ),
95
+ h(
96
+ Button,
97
+ {
98
+ name: 'cjk-ideographic',
99
+ title: $editTrans('cjkIdeographic'),
100
+ tooltip: props.tooltip,
101
+ color: props.color,
102
+ zIndex: props.zIndex,
103
+ active: active.value('cjk-ideographic'),
104
+ onOperate: () => setListStyle('cjk-ideographic')
105
+ },
106
+ {
107
+ default: () => h(Icon, { value: 'list-cjk-ideographic', style: { fontSize: '18px' } })
108
+ }
109
+ ),
110
+ h(
111
+ Button,
112
+ {
113
+ name: 'lower-roman',
114
+ title: $editTrans('lowerRoman'),
115
+ tooltip: props.tooltip,
116
+ color: props.color,
117
+ zIndex: props.zIndex,
118
+ active: active.value('lower-roman'),
119
+ onOperate: () => setListStyle('lower-roman')
120
+ },
121
+ {
122
+ default: () => h(Icon, { value: 'list-lower-roman', style: { fontSize: '18px' } })
123
+ }
124
+ ),
125
+ h(
126
+ Button,
127
+ {
128
+ name: 'upper-roman',
129
+ title: $editTrans('upperRoman'),
130
+ tooltip: props.tooltip,
131
+ color: props.color,
132
+ zIndex: props.zIndex,
133
+ active: active.value('upper-roman'),
134
+ onOperate: () => setListStyle('upper-roman')
135
+ },
136
+ {
137
+ default: () => h(Icon, { value: 'list-upper-roman', style: { fontSize: '18px' } })
138
+ }
139
+ ),
140
+ h(
141
+ Button,
142
+ {
143
+ name: 'lower-alpha',
144
+ title: $editTrans('lowerAlpha'),
145
+ tooltip: props.tooltip,
146
+ color: props.color,
147
+ zIndex: props.zIndex,
148
+ active: active.value('lower-alpha'),
149
+ onOperate: () => setListStyle('lower-alpha')
150
+ },
151
+ {
152
+ default: () => h(Icon, { value: 'list-lower-alpha', style: { fontSize: '18px' } })
153
+ }
154
+ ),
155
+ h(
156
+ Button,
157
+ {
158
+ name: 'upper-alpha',
159
+ title: $editTrans('upperAlpha'),
160
+ tooltip: props.tooltip,
161
+ color: props.color,
162
+ zIndex: props.zIndex,
163
+ active: active.value('upper-alpha'),
164
+ onOperate: () => setListStyle('upper-alpha')
165
+ },
166
+ {
167
+ default: () => h(Icon, { value: 'list-upper-alpha', style: { fontSize: '18px' } })
168
+ }
169
+ ),
170
+ h(
171
+ Button,
172
+ {
173
+ name: 'lower-greek',
174
+ title: $editTrans('lowerGreek'),
175
+ tooltip: props.tooltip,
176
+ color: props.color,
177
+ zIndex: props.zIndex,
178
+ active: active.value('lower-greek'),
179
+ onOperate: () => setListStyle('lower-greek')
180
+ },
181
+ {
182
+ default: () => h(Icon, { value: 'list-lower-greek', style: { fontSize: '18px' } })
183
+ }
184
+ )
185
+ ]
54
186
  }
55
187
  },
56
188
  {
@@ -58,7 +190,6 @@ export const OrderListToolbarButton = defineComponent(
58
190
  props: {
59
191
  color: String,
60
192
  zIndex: Number,
61
- config: Object as PropType<MenuButtonType>,
62
193
  tooltip: Boolean
63
194
  }
64
195
  }
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, h, inject, PropType, Ref } from 'vue'
2
- import { AlexEditor, AlexElement, AlexElementsRangeType } from 'alex-editor'
2
+ import { AlexEditor, AlexElementsRangeType } from 'alex-editor'
3
3
  import { Button } from '@/components/button'
4
4
  import { MenuButtonType } from '@/core/tool'
5
5
  import { Icon } from '@/components/icon'
6
- import { hasMathformulaInRange, hasPanelInRange, hasTableInRange } from '@/core/function'
6
+ import { hasMathformulaInRange, hasPanelInRange, hasTableInRange, insertPanel } from '@/core/function'
7
7
 
8
8
  /**
9
9
  * feature名称
@@ -35,53 +35,8 @@ export const PanelMenuButton = defineComponent(
35
35
  active: false,
36
36
  disabled: props.disabled || isSourceView.value || hasPanelInRange(editor.value, dataRangeCaches.value) || hasTableInRange(editor.value, dataRangeCaches.value) || hasMathformulaInRange(editor.value, dataRangeCaches.value) || props.config.disabled,
37
37
  onOperate: () => {
38
- const panelElement = AlexElement.create({
39
- type: 'block',
40
- parsedom: 'div',
41
- marks: {
42
- 'data-editify-panel': 'true'
43
- },
44
- children: [
45
- {
46
- type: 'inblock',
47
- parsedom: 'div',
48
- behavior: 'block',
49
- children: [
50
- {
51
- type: 'text',
52
- textcontent: $editTrans('panelTitle')
53
- }
54
- ]
55
- },
56
- {
57
- type: 'inblock',
58
- parsedom: 'div',
59
- behavior: 'block',
60
- children: [
61
- {
62
- type: 'text',
63
- textcontent: $editTrans('panelContent')
64
- }
65
- ]
66
- }
67
- ]
68
- })
69
- editor.value.insertElement(panelElement)
70
- //面板后面插入段落
71
- const paragraph = AlexElement.create({
72
- type: 'block',
73
- parsedom: AlexElement.BLOCK_NODE,
74
- children: [
75
- {
76
- type: 'closed',
77
- parsedom: 'br'
78
- }
79
- ]
80
- })
81
- editor.value.addElementAfter(paragraph, panelElement)
82
- //移动光标到新插入的元素
83
- editor.value.range!.anchor.moveToEnd(panelElement.children![0])
84
- editor.value.range!.focus.moveToEnd(panelElement.children![0])
38
+ //插入面板
39
+ insertPanel(editor.value, $editTrans('panelTitle'), $editTrans('panelContent'))
85
40
  //渲染
86
41
  editor.value.domRender()
87
42
  editor.value.rangeRender()
@@ -97,7 +97,7 @@ export const SubMenuButton = defineComponent(
97
97
  tooltip: props.tooltip,
98
98
  color: props.color,
99
99
  zIndex: props.zIndex,
100
- title: $editTrans('subscript'),
100
+ title: $editTrans('sub'),
101
101
  leftBorder: props.config.leftBorder,
102
102
  rightBorder: props.config.rightBorder,
103
103
  disabled: props.disabled || isSourceView.value || hasPreInRange(editor.value, dataRangeCaches.value) || props.config.disabled,
@@ -97,7 +97,7 @@ export const SuperMenuButton = defineComponent(
97
97
  tooltip: props.tooltip,
98
98
  color: props.color,
99
99
  zIndex: props.zIndex,
100
- title: $editTrans('superscript'),
100
+ title: $editTrans('super'),
101
101
  leftBorder: props.config.leftBorder,
102
102
  rightBorder: props.config.rightBorder,
103
103
  active: active.value,
@@ -1,4 +1,4 @@
1
- import { defineComponent, h, inject, PropType, Ref, ref } from 'vue'
1
+ import { defineComponent, h, inject, PropType, Ref } from 'vue'
2
2
  import { AlexElementsRangeType, AlexEditor } from 'alex-editor'
3
3
  import { MenuButtonType } from '@/core/tool'
4
4
  import { hasPanelInRange, hasPreInRange, hasTableInRange, rangeIsInTask, setTask } from '@/core/function'
@@ -10,60 +10,6 @@ import { Icon } from '@/components/icon'
10
10
  */
11
11
  const FEATURE_NAME = 'task'
12
12
 
13
- /**
14
- * 工具栏 - 任务列表
15
- */
16
- export const TaskToolbarButton = defineComponent(
17
- (props, { expose }) => {
18
- const editor = inject<Ref<AlexEditor>>('editor')!
19
- const dataRangeCaches = inject<Ref<AlexElementsRangeType>>('dataRangeCaches')!
20
- const $editTrans = inject<(key: string) => any>('$editTrans')!
21
-
22
- const btnRef = ref<InstanceType<typeof Button> | null>(null)
23
-
24
- expose({
25
- btnRef
26
- })
27
-
28
- return () => {
29
- return props.config.show
30
- ? h(
31
- Button,
32
- {
33
- ref: btnRef,
34
- name: FEATURE_NAME,
35
- title: $editTrans('task'),
36
- tooltip: props.tooltip,
37
- color: props.color,
38
- zIndex: props.zIndex,
39
- leftBorder: props.config.leftBorder,
40
- rightBorder: props.config.rightBorder,
41
- active: rangeIsInTask(editor.value, dataRangeCaches.value),
42
- disabled: props.config.disabled,
43
- onOperate: () => {
44
- setTask(editor.value, dataRangeCaches.value)
45
- editor.value.domRender()
46
- editor.value.rangeRender()
47
- }
48
- },
49
- {
50
- default: () => h(Icon, { value: 'task' })
51
- }
52
- )
53
- : null
54
- }
55
- },
56
- {
57
- name: `_${FEATURE_NAME}`,
58
- props: {
59
- color: String,
60
- zIndex: Number,
61
- config: Object as PropType<MenuButtonType>,
62
- tooltip: Boolean
63
- }
64
- }
65
- )
66
-
67
13
  /**
68
14
  * 菜单栏 - 任务列表
69
15
  */
@@ -1,7 +1,7 @@
1
- import { defineComponent, h, inject, PropType, Ref, ref } from 'vue'
2
- import { AlexElementsRangeType, AlexEditor } from 'alex-editor'
1
+ import { computed, defineComponent, h, inject, PropType, Ref } from 'vue'
2
+ import { AlexElementsRangeType, AlexEditor, AlexElement } from 'alex-editor'
3
3
  import { MenuButtonType } from '@/core/tool'
4
- import { hasPanelInRange, hasPreInRange, hasTableInRange, rangeIsInList, setList } from '@/core/function'
4
+ import { elementIsList, getMatchElementByRange, hasPanelInRange, hasPreInRange, hasTableInRange, rangeIsInList, setList } from '@/core/function'
5
5
  import { Button } from '@/components/button'
6
6
  import { Icon } from '@/components/icon'
7
7
 
@@ -10,47 +10,119 @@ import { Icon } from '@/components/icon'
10
10
  */
11
11
  const FEATURE_NAME = 'unorderList'
12
12
 
13
+ type orderType = 'disc' | 'circle' | 'square'
14
+
13
15
  /**
14
16
  * 工具栏 - 无序列表
15
17
  */
16
- export const UnorderListToolbarButton = defineComponent(
17
- (props, { expose }) => {
18
+ export const UnorderListToolbar = defineComponent(
19
+ props => {
18
20
  const editor = inject<Ref<AlexEditor>>('editor')!
19
21
  const dataRangeCaches = inject<Ref<AlexElementsRangeType>>('dataRangeCaches')!
20
22
  const $editTrans = inject<(key: string) => any>('$editTrans')!
21
23
 
22
- const btnRef = ref<InstanceType<typeof Button> | null>(null)
23
-
24
- expose({
25
- btnRef
24
+ const active = computed<(val: orderType) => boolean>(() => {
25
+ return val => {
26
+ const el = getMatchElementByRange(editor.value, dataRangeCaches.value, {
27
+ parsedom: 'div',
28
+ marks: {
29
+ 'data-editify-list': 'ul'
30
+ }
31
+ })
32
+ if (el && el.marks!['data-editify-list-style']) {
33
+ return el.marks!['data-editify-list-style'] == val
34
+ }
35
+ return val == 'disc'
36
+ }
26
37
  })
27
38
 
39
+ //设置前面列表的序标样式
40
+ const setPreviouseListStyle = (element: AlexElement, val: orderType) => {
41
+ element.marks!['data-editify-list-style'] = val
42
+ const previousElement = editor.value.getPreviousElement(element)
43
+ if (previousElement && elementIsList(previousElement, false)) {
44
+ setPreviouseListStyle(previousElement, val)
45
+ }
46
+ }
47
+
48
+ //设置后面列表的序标样式
49
+ const setNextListStyle = (element: AlexElement, val: orderType) => {
50
+ element.marks!['data-editify-list-style'] = val
51
+ const nextElement = editor.value.getNextElement(element)
52
+ if (nextElement && elementIsList(nextElement, false)) {
53
+ setNextListStyle(nextElement, val)
54
+ }
55
+ }
56
+
57
+ //设置列表序标样式
58
+ const setListStyle = (val: orderType) => {
59
+ const el = getMatchElementByRange(editor.value, dataRangeCaches.value, {
60
+ parsedom: 'div',
61
+ marks: {
62
+ 'data-editify-list': 'ul'
63
+ }
64
+ })!
65
+ el.marks!['data-editify-list-style'] = val
66
+ const previousElement = editor.value.getPreviousElement(el)
67
+ const nextElement = editor.value.getNextElement(el)
68
+ if (previousElement && elementIsList(previousElement, false)) {
69
+ setPreviouseListStyle(previousElement, val)
70
+ }
71
+ if (nextElement && elementIsList(nextElement, false)) {
72
+ setNextListStyle(nextElement, val)
73
+ }
74
+ editor.value.domRender()
75
+ editor.value.rangeRender()
76
+ }
77
+
28
78
  return () => {
29
- return props.config.show
30
- ? h(
31
- Button,
32
- {
33
- ref: btnRef,
34
- name: FEATURE_NAME,
35
- title: $editTrans('unorderList'),
36
- tooltip: props.tooltip,
37
- color: props.color,
38
- zIndex: props.zIndex,
39
- leftBorder: props.config.leftBorder,
40
- rightBorder: props.config.rightBorder,
41
- active: rangeIsInList(editor.value, dataRangeCaches.value, false),
42
- disabled: props.config.disabled,
43
- onOperate: () => {
44
- setList(editor.value, dataRangeCaches.value, false)
45
- editor.value.domRender()
46
- editor.value.rangeRender()
47
- }
48
- },
49
- {
50
- default: () => h(Icon, { value: 'list-unordered' })
51
- }
52
- )
53
- : null
79
+ return [
80
+ h(
81
+ Button,
82
+ {
83
+ name: 'disc',
84
+ title: $editTrans('disc'),
85
+ tooltip: props.tooltip,
86
+ color: props.color,
87
+ zIndex: props.zIndex,
88
+ active: active.value('disc'),
89
+ onOperate: () => setListStyle('disc')
90
+ },
91
+ {
92
+ default: () => h(Icon, { value: 'list-disc', style: { fontSize: '18px' } })
93
+ }
94
+ ),
95
+ h(
96
+ Button,
97
+ {
98
+ name: 'circle',
99
+ title: $editTrans('circle'),
100
+ tooltip: props.tooltip,
101
+ color: props.color,
102
+ zIndex: props.zIndex,
103
+ active: active.value('circle'),
104
+ onOperate: () => setListStyle('circle')
105
+ },
106
+ {
107
+ default: () => h(Icon, { value: 'list-circle', style: { fontSize: '18px' } })
108
+ }
109
+ ),
110
+ h(
111
+ Button,
112
+ {
113
+ name: 'square',
114
+ title: $editTrans('square'),
115
+ tooltip: props.tooltip,
116
+ color: props.color,
117
+ zIndex: props.zIndex,
118
+ active: active.value('square'),
119
+ onOperate: () => setListStyle('square')
120
+ },
121
+ {
122
+ default: () => h(Icon, { value: 'list-square', style: { fontSize: '18px' } })
123
+ }
124
+ )
125
+ ]
54
126
  }
55
127
  },
56
128
  {
@@ -58,7 +130,6 @@ export const UnorderListToolbarButton = defineComponent(
58
130
  props: {
59
131
  color: String,
60
132
  zIndex: Number,
61
- config: Object as PropType<MenuButtonType>,
62
133
  tooltip: Boolean
63
134
  }
64
135
  }
@@ -278,7 +278,7 @@ export const VideoMenuButton = defineComponent(
278
278
  zIndex: props.zIndex,
279
279
  type: 'select',
280
280
  hideScroll: true,
281
- title: $editTrans('insertImage'),
281
+ title: $editTrans('insertVideo'),
282
282
  leftBorder: props.config.leftBorder,
283
283
  rightBorder: props.config.rightBorder,
284
284
  active: false,
@@ -1,3 +1,43 @@
1
+ .editify-icon-list-square:before {
2
+ content: '\e659';
3
+ }
4
+
5
+ .editify-icon-list-circle:before {
6
+ content: '\e65a';
7
+ }
8
+
9
+ .editify-icon-list-disc:before {
10
+ content: '\e65b';
11
+ }
12
+
13
+ .editify-icon-list-cjk-ideographic:before {
14
+ content: '\e658';
15
+ }
16
+
17
+ .editify-icon-list-lower-roman:before {
18
+ content: '\e653';
19
+ }
20
+
21
+ .editify-icon-list-lower-greek:before {
22
+ content: '\e654';
23
+ }
24
+
25
+ .editify-icon-list-upper-roman:before {
26
+ content: '\e655';
27
+ }
28
+
29
+ .editify-icon-list-decimal:before {
30
+ content: '\e656';
31
+ }
32
+
33
+ .editify-icon-list-lower-alpha:before {
34
+ content: '\e657';
35
+ }
36
+
37
+ .editify-icon-list-upper-alpha:before {
38
+ content: '\e651';
39
+ }
40
+
1
41
  .editify-icon-info:before {
2
42
  content: '\e610';
3
43
  }
Binary file
Binary file
package/src/index.ts CHANGED
@@ -65,32 +65,38 @@ export {
65
65
  hasInfoBlockInRange,
66
66
  rangeIsInInfoBlock,
67
67
  hasPreInRange,
68
+ hasTableInRange,
68
69
  hasQuoteInRange,
70
+ rangeIsInQuote,
69
71
  hasLinkInRange,
70
- hasTableInRange,
71
72
  hasImageInRange,
72
73
  hasVideoInRange,
73
- rangeIsInQuote,
74
74
  queryTextStyle,
75
+ setTextStyle,
76
+ removeTextStyle,
75
77
  queryTextMark,
78
+ setTextMark,
79
+ removeTextMark,
76
80
  getRangeText,
81
+ addSpaceTextToBothSides,
82
+ setHeading,
77
83
  setIndentIncrease,
78
84
  setIndentDecrease,
79
85
  setQuote,
80
86
  setAlign,
81
87
  setList,
82
88
  setTask,
83
- setTextStyle,
84
- setTextMark,
85
- removeTextStyle,
86
- removeTextMark,
87
89
  setLineHeight,
88
90
  insertLink,
89
91
  insertImage,
90
92
  insertVideo,
91
93
  insertTable,
92
94
  insertCodeBlock,
93
- insertSeparator
95
+ insertSeparator,
96
+ insertAttachment,
97
+ insertMathformula,
98
+ insertInfoBlock,
99
+ insertPanel
94
100
  } from '@/core/function'
95
101
 
96
102
  //安装函数
@@ -98,7 +104,7 @@ const install = (app: App) => {
98
104
  app.component(Editify.name!, Editify)
99
105
  }
100
106
  //版本号
101
- const version = '0.2.16'
107
+ const version = '0.2.18'
102
108
 
103
109
  //导出组件和安装函数
104
110
  export { Editify as default, Editify, install, AlexElement, version }