tiptapify 0.0.2 → 0.0.4
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/README.md +1 -1
- package/dist/tiptapify.css +1 -1
- package/dist/tiptapify.es.js +5066 -4944
- package/dist/tiptapify.umd.js +32 -32
- package/package.json +1 -1
- package/src/components/MenuBubble.vue +9 -1
- package/src/components/Toolbar/Index.vue +1 -1
- package/src/components/Toolbar/items.ts +116 -7
- package/src/i18n/locales/en.json +2 -1
- package/src/i18n/locales/ru.json +2 -1
- package/src/i18n/locales/ua.json +2 -1
package/package.json
CHANGED
|
@@ -74,6 +74,14 @@ const items = ref([
|
|
|
74
74
|
disabled: computed(() => editorInstance.value.isActive('code') || editorInstance.value.isActive('codeBlock')),
|
|
75
75
|
},
|
|
76
76
|
click: () => linkAction(),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'format clear',
|
|
80
|
+
icon: mdi.mdiFormatClear,
|
|
81
|
+
props: {
|
|
82
|
+
active: false,
|
|
83
|
+
},
|
|
84
|
+
click: () => editorInstance.value.chain().focus().unsetAllMarks().clearNodes().run(),
|
|
77
85
|
}
|
|
78
86
|
])
|
|
79
87
|
|
|
@@ -86,7 +94,7 @@ function linkAction() {
|
|
|
86
94
|
|
|
87
95
|
<template>
|
|
88
96
|
<!-- <BubbleMenu v-if="editorInstance" :editor="editorInstance" :tippy-options="{ duration: 100 }">-->
|
|
89
|
-
<BubbleMenu v-if="editorInstance" :editor="editorInstance">
|
|
97
|
+
<BubbleMenu v-if="editorInstance" :editor="editorInstance" :options="{ placement: 'bottom' }">
|
|
90
98
|
<div class="bubble-menu">
|
|
91
99
|
<VBtnToggle divided density="compact" :variant="variant">
|
|
92
100
|
<VBtn v-for="(item, key) in items" :key="key" v-bind="item.props" @click="item.click" size="small">
|
|
@@ -69,7 +69,7 @@ const toolbarItemsRef: Ref<ToolbarItemSections> = ref(items)
|
|
|
69
69
|
</VBtn>
|
|
70
70
|
</template>
|
|
71
71
|
|
|
72
|
-
<VList v-model="toolbarItem.modelValue">
|
|
72
|
+
<VList v-model="toolbarItem.modelValue" max-height="430px">
|
|
73
73
|
<VListItem
|
|
74
74
|
v-for="(item, menuItemKey) in toolbarItem.children"
|
|
75
75
|
:key="menuItemKey"
|
|
@@ -3,25 +3,121 @@ import * as mdi from '@mdi/js'
|
|
|
3
3
|
|
|
4
4
|
const fonts = ref([
|
|
5
5
|
{
|
|
6
|
-
name: '
|
|
7
|
-
fontFamily: '
|
|
6
|
+
name: 'Arial',
|
|
7
|
+
fontFamily: 'arial'
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: 'Arial Black',
|
|
11
|
+
fontFamily: 'arial black'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Baskerville',
|
|
15
|
+
fontFamily: 'baskerville'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'Bodoni MT',
|
|
19
|
+
fontFamily: 'bodoni mt'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Brush Script MT',
|
|
23
|
+
fontFamily: 'brush script mt'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Calibri',
|
|
27
|
+
fontFamily: 'calibri'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Calisto MT',
|
|
31
|
+
fontFamily: 'calisto mt'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Cambria',
|
|
35
|
+
fontFamily: 'cambria'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Century Gothic',
|
|
39
|
+
fontFamily: 'century gothic'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'Consolas',
|
|
43
|
+
fontFamily: 'consolas'
|
|
8
44
|
},
|
|
9
45
|
{
|
|
10
46
|
name: 'Comic Sans',
|
|
11
|
-
fontFamily: '
|
|
47
|
+
fontFamily: 'comic sans ms, comic sans'
|
|
12
48
|
},
|
|
13
49
|
{
|
|
14
|
-
name: '
|
|
15
|
-
fontFamily: '
|
|
50
|
+
name: 'Courier',
|
|
51
|
+
fontFamily: 'Courier'
|
|
16
52
|
},
|
|
17
53
|
{
|
|
18
|
-
name: '
|
|
19
|
-
fontFamily: '
|
|
54
|
+
name: 'Courier New',
|
|
55
|
+
fontFamily: 'courier new'
|
|
20
56
|
},
|
|
21
57
|
{
|
|
22
58
|
name: 'Cursive',
|
|
23
59
|
fontFamily: 'cursive'
|
|
24
60
|
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Dejavu Sans',
|
|
63
|
+
fontFamily: 'dejavu sans'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Franklin Gothic',
|
|
67
|
+
fontFamily: 'franklin gothic'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Garamond',
|
|
71
|
+
fontFamily: 'garamond'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Georgia',
|
|
75
|
+
fontFamily: 'georgia'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Helvetica',
|
|
79
|
+
fontFamily: 'helvetica'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Impact',
|
|
83
|
+
fontFamily: 'impact'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'Inter',
|
|
87
|
+
fontFamily: 'inter'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Monospace',
|
|
91
|
+
fontFamily: 'monospace'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Optima',
|
|
95
|
+
fontFamily: 'optima'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'Segoe UI',
|
|
99
|
+
fontFamily: 'segoe ui'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Serif',
|
|
103
|
+
fontFamily: 'serif'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'Tahoma',
|
|
107
|
+
fontFamily: 'tahoma'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'Time New Roman',
|
|
111
|
+
fontFamily: 'times new roman'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Trebuchet MS',
|
|
115
|
+
fontFamily: 'trebuchet ms'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'Verdana',
|
|
119
|
+
fontFamily: 'verdana'
|
|
120
|
+
},
|
|
25
121
|
])
|
|
26
122
|
|
|
27
123
|
interface MDIIcons {
|
|
@@ -271,6 +367,19 @@ export function toolbarItems(
|
|
|
271
367
|
click: () => editor.value.chain().focus().toggleHighlight().run()
|
|
272
368
|
}
|
|
273
369
|
},
|
|
370
|
+
formatClear: {
|
|
371
|
+
name: 'format clear',
|
|
372
|
+
tooltip: 'format.formatClear',
|
|
373
|
+
icon: mdi.mdiFormatClear,
|
|
374
|
+
section: 'format',
|
|
375
|
+
enabled: true,
|
|
376
|
+
props: {
|
|
377
|
+
disabled: computed(() => !editor.value.can().chain().focus().unsetAllMarks().run()),
|
|
378
|
+
},
|
|
379
|
+
attrs: {
|
|
380
|
+
click: () => editor.value.chain().focus().unsetAllMarks().clearNodes().run()
|
|
381
|
+
}
|
|
382
|
+
},
|
|
274
383
|
|
|
275
384
|
code: {
|
|
276
385
|
name: 'code',
|
package/src/i18n/locales/en.json
CHANGED
package/src/i18n/locales/ru.json
CHANGED
package/src/i18n/locales/ua.json
CHANGED