tiptapify 0.0.12 → 0.0.14
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 +14 -5
- package/dist/tiptapify.css +1 -1
- package/dist/tiptapify.mjs +76483 -57282
- package/dist/tiptapify.umd.js +42 -42
- package/package.json +56 -47
- package/src/components/Footer.vue +1 -3
- package/src/components/Tiptapify.vue +15 -3
- package/src/components/Toolbar/GroupBtn.vue +0 -1
- package/src/components/Toolbar/Toggle.vue +2 -3
- package/src/components/Toolbar/defaultExtensionComponents.ts +13 -1
- package/src/components/UI/TiptapifyDialog.vue +2 -3
- package/src/components/editorExtensions.ts +5 -0
- package/src/composables/Toolbar/Actions/useRedo.ts +1 -2
- package/src/composables/Toolbar/Actions/useUndo.ts +1 -2
- package/src/composables/Toolbar/Alignment/useAlignmentCenter.ts +1 -2
- package/src/composables/Toolbar/Alignment/useAlignmentJustify.ts +1 -2
- package/src/composables/Toolbar/Alignment/useAlignmentLeft.ts +1 -2
- package/src/composables/Toolbar/Alignment/useAlignmentRight.ts +1 -2
- package/src/composables/Toolbar/Format/useBold.ts +1 -2
- package/src/composables/Toolbar/Format/useItalic.ts +1 -2
- package/src/composables/Toolbar/Format/useStrike.ts +1 -2
- package/src/composables/Toolbar/Format/useUnderline.ts +1 -2
- package/src/composables/Toolbar/FormatExtra/useBlockquote.ts +1 -2
- package/src/composables/Toolbar/FormatExtra/useCode.ts +1 -2
- package/src/composables/Toolbar/FormatExtra/useCodeBlock.ts +1 -2
- package/src/composables/Toolbar/FormatExtra/useSub.ts +1 -2
- package/src/composables/Toolbar/FormatExtra/useSup.ts +1 -2
- package/src/composables/Toolbar/List/useBullet.ts +1 -2
- package/src/composables/Toolbar/List/useIndent.ts +1 -2
- package/src/composables/Toolbar/List/useNumbered.ts +1 -2
- package/src/composables/Toolbar/List/useOutdent.ts +1 -2
- package/src/composables/Toolbar/List/useTask.ts +1 -2
- package/src/composables/Toolbar/Media/useEmoji.ts +19 -0
- package/src/composables/Toolbar/Media/useImage.ts +1 -2
- package/src/composables/Toolbar/Media/useLink.ts +1 -2
- package/src/composables/Toolbar/Media/useTable.ts +1 -2
- package/src/composables/Toolbar/Media/useVideo.ts +22 -0
- package/src/composables/Toolbar/Misc/useBreak.ts +1 -2
- package/src/composables/Toolbar/Misc/useFormatClear.ts +1 -2
- package/src/composables/Toolbar/Misc/useInvisibleCharacters.ts +1 -2
- package/src/composables/Toolbar/Misc/useLine.ts +1 -2
- package/src/composables/Toolbar/Misc/usePreview.ts +1 -2
- package/src/composables/Toolbar/Misc/useSource.ts +1 -2
- package/src/composables/Toolbar/Style/useColor.ts +1 -2
- package/src/composables/Toolbar/Style/useFontFamily.ts +1 -2
- package/src/composables/Toolbar/Style/useFontSize.ts +1 -2
- package/src/composables/Toolbar/Style/useHeading.ts +1 -2
- package/src/composables/Toolbar/Style/useHighlight.ts +1 -2
- package/src/composables/Toolbar/Style/useLineHeight.ts +1 -2
- package/src/composables/Toolbar/useMediaItems.ts +4 -0
- package/src/extensions/components/Emoji.vue +108 -0
- package/src/extensions/components/FontFamily.vue +1 -2
- package/src/extensions/components/FontSize.vue +1 -2
- package/src/extensions/components/ImageDialog.vue +1 -2
- package/src/extensions/components/LineHeight.vue +1 -2
- package/src/extensions/components/LinkDialog.vue +1 -2
- package/src/extensions/components/ShowSourceDialog.vue +1 -2
- package/src/extensions/components/StyleColor.vue +1 -2
- package/src/extensions/components/TableBuilder.vue +1 -2
- package/src/extensions/components/VideoDialog.vue +138 -0
- package/src/extensions/emoji/activities.ts +770 -0
- package/src/extensions/emoji/animals_and_nature.ts +1330 -0
- package/src/extensions/emoji/component.ts +74 -0
- package/src/extensions/emoji/flags.ts +2210 -0
- package/src/extensions/emoji/food_and_drink.ts +1066 -0
- package/src/extensions/emoji/index.ts +63 -0
- package/src/extensions/emoji/objects.ts +2514 -0
- package/src/extensions/emoji/people_and_body.ts +3986 -0
- package/src/extensions/emoji/smileys_and_emotion.ts +1482 -0
- package/src/extensions/emoji/symbols.ts +2242 -0
- package/src/extensions/emoji/travel_and_places.ts +2138 -0
- package/src/i18n/index.ts +23 -10
- package/src/i18n/locales/ch.json +18 -0
- package/src/i18n/locales/cz.json +18 -0
- package/src/i18n/locales/de.json +18 -0
- package/src/i18n/locales/en.json +21 -1
- package/src/i18n/locales/es.json +18 -0
- package/src/i18n/locales/fr.json +18 -0
- package/src/i18n/locales/it.json +18 -0
- package/src/i18n/locales/la.json +18 -0
- package/src/i18n/locales/lt.json +18 -0
- package/src/i18n/locales/nl.json +18 -0
- package/src/i18n/locales/pl.json +18 -0
- package/src/i18n/locales/pt.json +18 -0
- package/src/i18n/locales/ru.json +21 -1
- package/src/i18n/locales/se.json +18 -0
- package/src/i18n/locales/ua.json +21 -1
- package/src/index.ts +0 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiptapify",
|
|
3
3
|
"types": "./index.d.ts",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.14",
|
|
5
5
|
"description": "Tiptap3 editor with Vuetify3 menu implementation",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"dev": "vite",
|
|
31
31
|
"build": "vite build",
|
|
32
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
32
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
33
|
+
"build:emojis": "tsx build-emojis.ts"
|
|
33
34
|
},
|
|
34
35
|
"keywords": [
|
|
35
36
|
"vue",
|
|
@@ -44,58 +45,65 @@
|
|
|
44
45
|
"tiptap slash command",
|
|
45
46
|
"tiptap toolbar",
|
|
46
47
|
"editor",
|
|
48
|
+
"editor toolbar",
|
|
47
49
|
"material design",
|
|
50
|
+
"material design icons",
|
|
48
51
|
"wysiwyg",
|
|
49
|
-
"
|
|
52
|
+
"wysiwyg toolbar",
|
|
53
|
+
"markdown",
|
|
54
|
+
"emoji",
|
|
55
|
+
"emoticons"
|
|
50
56
|
],
|
|
51
57
|
"author": "Igor Voytovich",
|
|
52
58
|
"license": "MIT",
|
|
53
59
|
"repository": "https://github.com/IVoyt/tiptapify",
|
|
54
60
|
"packageManager": "pnpm@10.12.1",
|
|
55
61
|
"dependencies": {
|
|
56
|
-
"@tiptap/core": "^3.0.
|
|
57
|
-
"@tiptap/extension-blockquote": "^3.0.
|
|
58
|
-
"@tiptap/extension-bold": "^3.0.
|
|
59
|
-
"@tiptap/extension-bubble-menu": "^3.0.
|
|
60
|
-
"@tiptap/extension-code": "^3.0.
|
|
61
|
-
"@tiptap/extension-code-block": "^3.0.
|
|
62
|
-
"@tiptap/extension-code-block-lowlight": "^3.0.
|
|
63
|
-
"@tiptap/extension-color": "^3.0.
|
|
64
|
-
"@tiptap/extension-document": "^3.0.
|
|
65
|
-
"@tiptap/extension-floating-menu": "^3.0.
|
|
66
|
-
"@tiptap/extension-font-family": "^3.0.
|
|
67
|
-
"@tiptap/extension-hard-break": "^3.0.
|
|
68
|
-
"@tiptap/extension-heading": "^3.0.
|
|
69
|
-
"@tiptap/extension-highlight": "^3.0.
|
|
70
|
-
"@tiptap/extension-horizontal-rule": "^3.0.
|
|
71
|
-
"@tiptap/extension-image": "^3.0.
|
|
72
|
-
"@tiptap/extension-invisible-characters": "^3.0.
|
|
73
|
-
"@tiptap/extension-italic": "^3.0.
|
|
74
|
-
"@tiptap/extension-link": "^3.0.
|
|
75
|
-
"@tiptap/extension-list": "^3.0.
|
|
76
|
-
"@tiptap/extension-list-item": "^3.0.
|
|
77
|
-
"@tiptap/extension-paragraph": "^3.0.
|
|
78
|
-
"@tiptap/extension-placeholder": "^3.0.
|
|
79
|
-
"@tiptap/extension-strike": "^3.0.
|
|
80
|
-
"@tiptap/extension-subscript": "^3.0.
|
|
81
|
-
"@tiptap/extension-superscript": "^3.0.
|
|
82
|
-
"@tiptap/extension-table": "^3.0.
|
|
83
|
-
"@tiptap/extension-task-item": "^3.0.
|
|
84
|
-
"@tiptap/extension-task-list": "^3.0.
|
|
85
|
-
"@tiptap/extension-text": "^3.0.
|
|
86
|
-
"@tiptap/extension-text-align": "^3.0.
|
|
87
|
-
"@tiptap/extension-text-style": "^3.0.
|
|
88
|
-
"@tiptap/extension-typography": "^3.0.
|
|
89
|
-
"@tiptap/extension-underline": "^3.0.
|
|
90
|
-
"@tiptap/
|
|
91
|
-
"@tiptap/
|
|
92
|
-
"@tiptap/
|
|
93
|
-
"@tiptap/
|
|
94
|
-
"@tiptap/
|
|
62
|
+
"@tiptap/core": "^3.0.9",
|
|
63
|
+
"@tiptap/extension-blockquote": "^3.0.9",
|
|
64
|
+
"@tiptap/extension-bold": "^3.0.9",
|
|
65
|
+
"@tiptap/extension-bubble-menu": "^3.0.9",
|
|
66
|
+
"@tiptap/extension-code": "^3.0.9",
|
|
67
|
+
"@tiptap/extension-code-block": "^3.0.9",
|
|
68
|
+
"@tiptap/extension-code-block-lowlight": "^3.0.9",
|
|
69
|
+
"@tiptap/extension-color": "^3.0.9",
|
|
70
|
+
"@tiptap/extension-document": "^3.0.9",
|
|
71
|
+
"@tiptap/extension-floating-menu": "^3.0.9",
|
|
72
|
+
"@tiptap/extension-font-family": "^3.0.9",
|
|
73
|
+
"@tiptap/extension-hard-break": "^3.0.9",
|
|
74
|
+
"@tiptap/extension-heading": "^3.0.9",
|
|
75
|
+
"@tiptap/extension-highlight": "^3.0.9",
|
|
76
|
+
"@tiptap/extension-horizontal-rule": "^3.0.9",
|
|
77
|
+
"@tiptap/extension-image": "^3.0.9",
|
|
78
|
+
"@tiptap/extension-invisible-characters": "^3.0.9",
|
|
79
|
+
"@tiptap/extension-italic": "^3.0.9",
|
|
80
|
+
"@tiptap/extension-link": "^3.0.9",
|
|
81
|
+
"@tiptap/extension-list": "^3.0.9",
|
|
82
|
+
"@tiptap/extension-list-item": "^3.0.9",
|
|
83
|
+
"@tiptap/extension-paragraph": "^3.0.9",
|
|
84
|
+
"@tiptap/extension-placeholder": "^3.0.9",
|
|
85
|
+
"@tiptap/extension-strike": "^3.0.9",
|
|
86
|
+
"@tiptap/extension-subscript": "^3.0.9",
|
|
87
|
+
"@tiptap/extension-superscript": "^3.0.9",
|
|
88
|
+
"@tiptap/extension-table": "^3.0.9",
|
|
89
|
+
"@tiptap/extension-task-item": "^3.0.9",
|
|
90
|
+
"@tiptap/extension-task-list": "^3.0.9",
|
|
91
|
+
"@tiptap/extension-text": "^3.0.9",
|
|
92
|
+
"@tiptap/extension-text-align": "^3.0.9",
|
|
93
|
+
"@tiptap/extension-text-style": "^3.0.9",
|
|
94
|
+
"@tiptap/extension-typography": "^3.0.9",
|
|
95
|
+
"@tiptap/extension-underline": "^3.0.9",
|
|
96
|
+
"@tiptap/extension-youtube": "^3.0.9",
|
|
97
|
+
"@tiptap/extensions": "^3.0.9",
|
|
98
|
+
"@tiptap/pm": "^3.0.9",
|
|
99
|
+
"@tiptap/starter-kit": "^3.0.9",
|
|
100
|
+
"@tiptap/suggestion": "^3.0.9",
|
|
101
|
+
"@tiptap/vue-3": "^3.0.9",
|
|
102
|
+
"emoji.json": "^16.0.0",
|
|
95
103
|
"highlight.js": "^11.11.1",
|
|
96
|
-
"linkifyjs": "^4.3.
|
|
104
|
+
"linkifyjs": "^4.3.2",
|
|
97
105
|
"lowlight": "^3.3.0",
|
|
98
|
-
"vue-i18n": "^11.1.
|
|
106
|
+
"vue-i18n": "^11.1.11"
|
|
99
107
|
},
|
|
100
108
|
"peerDependencies": {
|
|
101
109
|
"@mdi/js": "^7.4.47",
|
|
@@ -105,15 +113,16 @@
|
|
|
105
113
|
"devDependencies": {
|
|
106
114
|
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
107
115
|
"@rollup/plugin-alias": "^5.1.1",
|
|
108
|
-
"@types/node": "^22.
|
|
116
|
+
"@types/node": "^22.17.0",
|
|
109
117
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
110
118
|
"@vitejs/plugin-vue-jsx": "^4.2.0",
|
|
111
119
|
"rollup-plugin-tsconfig-paths": "^1.5.2",
|
|
112
120
|
"sass-embedded": "^1.89.2",
|
|
113
|
-
"
|
|
121
|
+
"tsx": "^4.20.3",
|
|
122
|
+
"typescript": "^5.9.2",
|
|
114
123
|
"unplugin-vue-components": "^28.8.0",
|
|
115
124
|
"vite": "^6.3.5",
|
|
116
|
-
"vite-plugin-vuetify": "^2.1.
|
|
125
|
+
"vite-plugin-vuetify": "^2.1.2",
|
|
117
126
|
"vite-svg-loader": "^5.1.0",
|
|
118
127
|
"vite-tsconfig-paths": "^5.1.4",
|
|
119
128
|
"vue-tsc": "^2.2.12"
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, ref, Ref } from "vue";
|
|
4
4
|
|
|
5
|
-
import { useI18n } from "vue-i18n";
|
|
6
|
-
|
|
7
5
|
const props = defineProps({
|
|
8
6
|
showWordsCount: { type: Boolean, default: true },
|
|
9
7
|
showCharactersCount: { type: Boolean, default: true },
|
|
10
8
|
})
|
|
11
9
|
|
|
12
|
-
const { t } =
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
13
11
|
|
|
14
12
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
13
|
|
|
@@ -7,17 +7,19 @@ import { Editor, EditorContent } from '@tiptap/vue-3'
|
|
|
7
7
|
import MenuBubble from '@tiptapify/components/MenuBubble.vue'
|
|
8
8
|
import MenuFloating from '@tiptapify/components/MenuFloating.vue'
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { useLocale } from "@tiptapify/i18n";
|
|
11
11
|
|
|
12
12
|
import { getTiptapEditor } from "@tiptapify/components/index";
|
|
13
13
|
|
|
14
14
|
import Footer from '@tiptapify/components/Footer.vue'
|
|
15
15
|
import { useTheme } from "vuetify/framework";
|
|
16
16
|
|
|
17
|
-
const { t } =
|
|
17
|
+
const { t, i18n, setLocale } = useLocale();
|
|
18
18
|
|
|
19
19
|
const props = defineProps({
|
|
20
|
+
locale: { type: String, default () { return 'en' } },
|
|
20
21
|
content: String|Object,
|
|
22
|
+
height: { type: Number, default () { return null } },
|
|
21
23
|
variantBtn: { type: String, default () { return 'elevated' } },
|
|
22
24
|
variantField: { type: String, default () { return 'solo' } },
|
|
23
25
|
toolbar: { type: Boolean, default () { return true } },
|
|
@@ -48,6 +50,7 @@ const editor: ShallowRef<Editor | undefined> = getTiptapEditor(
|
|
|
48
50
|
const emit = defineEmits(['update:modelValue', 'editor-ready']);
|
|
49
51
|
|
|
50
52
|
provide('tiptapifyEditor', editor)
|
|
53
|
+
provide('tiptapifyI18n', { t, setLocale })
|
|
51
54
|
|
|
52
55
|
editor.value?.chain().setFontFamily(props.defaultFontFamily).run()
|
|
53
56
|
|
|
@@ -61,6 +64,10 @@ watch(() => editor.value, (editorInstance) => {
|
|
|
61
64
|
}
|
|
62
65
|
}, { immediate: true });
|
|
63
66
|
|
|
67
|
+
watch(() => props.locale, () => {
|
|
68
|
+
setLocale(props.locale)
|
|
69
|
+
}, { immediate: true });
|
|
70
|
+
|
|
64
71
|
onBeforeUnmount(() => {
|
|
65
72
|
editor.value?.destroy()
|
|
66
73
|
})
|
|
@@ -85,7 +92,7 @@ onBeforeUnmount(() => {
|
|
|
85
92
|
</template>
|
|
86
93
|
|
|
87
94
|
<div :class="`border border-t-0 rounded-b-${rounded}`">
|
|
88
|
-
<div class="pa-2 tiptapify-container">
|
|
95
|
+
<div class="pa-2 tiptapify-container resizable" :style="`${height > 0 ? `height: ${height}px` : ''}`">
|
|
89
96
|
<MenuFloating v-if="floatingMenu" :variant="variantBtn" :theme="currentTheme" />
|
|
90
97
|
|
|
91
98
|
<MenuBubble v-if="bubbleMenu" :variant="variantBtn" :theme="currentTheme" />
|
|
@@ -131,6 +138,11 @@ onBeforeUnmount(() => {
|
|
|
131
138
|
--border: 1px solid var(--gray-2);
|
|
132
139
|
}
|
|
133
140
|
|
|
141
|
+
.resizable {
|
|
142
|
+
resize: vertical;
|
|
143
|
+
overflow: auto;
|
|
144
|
+
}
|
|
145
|
+
|
|
134
146
|
/* Basic editor styles */
|
|
135
147
|
.tiptap {
|
|
136
148
|
:first-child {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { defineProps, PropType } from 'vue'
|
|
3
|
-
import { useI18n } from "vue-i18n";
|
|
2
|
+
import { defineProps, inject, PropType } from 'vue'
|
|
4
3
|
import * as mdi from '@mdi/js'
|
|
5
4
|
|
|
6
5
|
import { ToolbarItemSection } from "@tiptapify/components/Toolbar/items";
|
|
@@ -10,7 +9,7 @@ defineProps({
|
|
|
10
9
|
toolbarSection: { type: Object as PropType<ToolbarItemSection>, default() { return {} }}
|
|
11
10
|
})
|
|
12
11
|
|
|
13
|
-
const { t } =
|
|
12
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
14
13
|
|
|
15
14
|
</script>
|
|
16
15
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useImage } from "@tiptapify/composables/Toolbar/Media/useImage";
|
|
2
2
|
import { useLink } from "@tiptapify/composables/Toolbar/Media/useLink";
|
|
3
|
+
import { useVideo } from "@tiptapify/composables/Toolbar/Media/useVideo";
|
|
3
4
|
import { usePreview } from "@tiptapify/composables/Toolbar/Misc/usePreview";
|
|
4
5
|
import { useSource } from "@tiptapify/composables/Toolbar/Misc/useSource";
|
|
5
6
|
import ImageDialog from "@tiptapify/extensions/components/ImageDialog.vue";
|
|
6
7
|
import LinkDialog from "@tiptapify/extensions/components/LinkDialog.vue";
|
|
7
8
|
import PreviewDialog from "@tiptapify/extensions/components/PreviewDialog.vue";
|
|
8
9
|
import ShowSourceDialog from "@tiptapify/extensions/components/ShowSourceDialog.vue";
|
|
10
|
+
import VideoDialog from "@tiptapify/extensions/components/VideoDialog.vue";
|
|
9
11
|
import { extensionComponents } from "@tiptapify/types/extensionComponents";
|
|
10
12
|
import { ToolbarSections } from "@tiptapify/types/toolbarSections";
|
|
11
13
|
import { computed, markRaw } from "vue";
|
|
@@ -48,6 +50,16 @@ export function getDefaultComponents(variantField: string): extensionComponents
|
|
|
48
50
|
name: useSource().name,
|
|
49
51
|
tooltip: useSource().tooltip,
|
|
50
52
|
icon: useSource().icon,
|
|
51
|
-
}
|
|
53
|
+
},
|
|
54
|
+
video: {
|
|
55
|
+
component: markRaw(VideoDialog),
|
|
56
|
+
componentProps: {
|
|
57
|
+
variantField: computed(() => variantField).value,
|
|
58
|
+
},
|
|
59
|
+
section: ToolbarSections.media,
|
|
60
|
+
name: useVideo().name,
|
|
61
|
+
tooltip: useVideo().tooltip,
|
|
62
|
+
icon: useVideo().icon,
|
|
63
|
+
},
|
|
52
64
|
}
|
|
53
65
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from "@mdi/js";
|
|
4
|
-
import { nextTick, ref, watch } from "vue";
|
|
5
|
-
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { inject, nextTick, ref, watch } from "vue";
|
|
6
5
|
|
|
7
6
|
const props = defineProps({
|
|
8
7
|
module: String,
|
|
@@ -11,7 +10,7 @@ const props = defineProps({
|
|
|
11
10
|
maxWidth: { type: Number, default () { return 800 } },
|
|
12
11
|
})
|
|
13
12
|
|
|
14
|
-
const { t } =
|
|
13
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
15
14
|
|
|
16
15
|
defineExpose({ open, close })
|
|
17
16
|
const emits = defineEmits(['closeDialog'])
|
|
@@ -16,6 +16,7 @@ import { HorizontalRule } from '@tiptap/extension-horizontal-rule'
|
|
|
16
16
|
import { Typography } from '@tiptap/extension-typography'
|
|
17
17
|
import { Highlight } from '@tiptap/extension-highlight'
|
|
18
18
|
import { Image } from '@tiptap/extension-image'
|
|
19
|
+
import { Youtube } from '@tiptap/extension-youtube'
|
|
19
20
|
import { Superscript } from '@tiptap/extension-superscript'
|
|
20
21
|
import { Subscript } from '@tiptap/extension-subscript'
|
|
21
22
|
import { TextAlign } from '@tiptap/extension-text-align'
|
|
@@ -77,6 +78,10 @@ export function editorExtensions (placeholder: string, slashCommands: boolean, c
|
|
|
77
78
|
defaultProtocol: 'https'
|
|
78
79
|
}),
|
|
79
80
|
Image,
|
|
81
|
+
Youtube.configure({
|
|
82
|
+
controls: true,
|
|
83
|
+
nocookie: true,
|
|
84
|
+
}),
|
|
80
85
|
TiptapifyImage,
|
|
81
86
|
Superscript,
|
|
82
87
|
Subscript,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useRedo() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useUndo() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useAlignmentCenter() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useAlignmentJustify() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useAlignmentLeft() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useAlignmentRight() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useBold() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useItalic() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useStrike() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useUnderline() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useBlockquote() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useCode() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useCodeBlock() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useSub() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useSup() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useBullet() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useIndent() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useNumbered() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useOutdent() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useTask() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as mdi from "@mdi/js";
|
|
2
|
+
import Emoji from "@tiptapify/extensions/components/Emoji.vue";
|
|
3
|
+
import { computed, inject, markRaw } from "vue";
|
|
4
|
+
|
|
5
|
+
export function useEmoji() {
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
name: computed(() => t('media.emoji.title')),
|
|
10
|
+
tooltip: computed(() => t('media.emoji.title')),
|
|
11
|
+
icon: `mdiSvg:${mdi.mdiEmoticon}`,
|
|
12
|
+
enabled: true,
|
|
13
|
+
component: markRaw(Emoji),
|
|
14
|
+
props: {
|
|
15
|
+
persistent: false,
|
|
16
|
+
closeOnContentClick: false,
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useImage() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import { computed, inject, Ref } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
5
4
|
|
|
6
5
|
export function useLink() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
9
|
|
|
@@ -2,10 +2,9 @@ import * as mdi from "@mdi/js";
|
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import TableBuilder from "@tiptapify/extensions/components/TableBuilder.vue";
|
|
4
4
|
import { computed, inject, markRaw, Ref } from "vue";
|
|
5
|
-
import { useI18n } from "vue-i18n";
|
|
6
5
|
|
|
7
6
|
export function useTable() {
|
|
8
|
-
const { t } =
|
|
7
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
9
8
|
|
|
10
9
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
11
10
|
|