tiptapify 0.0.13 → 0.0.15
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 +12 -4
- package/dist/tiptapify.css +1 -1
- package/dist/tiptapify.mjs +44219 -43771
- package/dist/tiptapify.umd.js +38 -38
- package/package.json +47 -41
- package/src/components/Footer.vue +1 -3
- package/src/components/Tiptapify.vue +39 -33
- package/src/components/Toolbar/GroupBtn.vue +0 -1
- package/src/components/Toolbar/Items.vue +0 -2
- package/src/components/Toolbar/defaultExtensionComponents.ts +13 -1
- package/src/components/Toolbar/items.ts +1 -6
- 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 +4 -5
- 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 +2 -3
- 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 +2 -0
- package/src/extensions/components/Emoji.vue +1 -2
- 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/i18n/index.ts +23 -10
- package/src/i18n/locales/ch.json +6 -0
- package/src/i18n/locales/cz.json +6 -0
- package/src/i18n/locales/de.json +6 -0
- package/src/i18n/locales/en.json +9 -1
- package/src/i18n/locales/es.json +6 -0
- package/src/i18n/locales/fr.json +6 -0
- package/src/i18n/locales/it.json +6 -0
- package/src/i18n/locales/la.json +6 -0
- package/src/i18n/locales/lt.json +6 -0
- package/src/i18n/locales/nl.json +6 -0
- package/src/i18n/locales/pl.json +6 -0
- package/src/i18n/locales/pt.json +6 -0
- package/src/i18n/locales/ru.json +9 -1
- package/src/i18n/locales/se.json +6 -0
- package/src/i18n/locales/ua.json +9 -1
- package/src/index.ts +0 -3
- package/src/types/toolbarItems.ts +0 -2
- package/src/components/Toolbar/Toggle.vue +0 -31
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.15",
|
|
5
5
|
"description": "Tiptap3 editor with Vuetify3 menu implementation",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -45,54 +45,60 @@
|
|
|
45
45
|
"tiptap slash command",
|
|
46
46
|
"tiptap toolbar",
|
|
47
47
|
"editor",
|
|
48
|
+
"editor toolbar",
|
|
48
49
|
"material design",
|
|
50
|
+
"material design icons",
|
|
49
51
|
"wysiwyg",
|
|
50
|
-
"
|
|
52
|
+
"wysiwyg toolbar",
|
|
53
|
+
"markdown",
|
|
54
|
+
"emoji",
|
|
55
|
+
"emoticons"
|
|
51
56
|
],
|
|
52
57
|
"author": "Igor Voytovich",
|
|
53
58
|
"license": "MIT",
|
|
54
59
|
"repository": "https://github.com/IVoyt/tiptapify",
|
|
55
60
|
"packageManager": "pnpm@10.12.1",
|
|
56
61
|
"dependencies": {
|
|
57
|
-
"@tiptap/core": "^3.0.
|
|
58
|
-
"@tiptap/extension-blockquote": "^3.0.
|
|
59
|
-
"@tiptap/extension-bold": "^3.0.
|
|
60
|
-
"@tiptap/extension-bubble-menu": "^3.0.
|
|
61
|
-
"@tiptap/extension-code": "^3.0.
|
|
62
|
-
"@tiptap/extension-code-block": "^3.0.
|
|
63
|
-
"@tiptap/extension-code-block-lowlight": "^3.0.
|
|
64
|
-
"@tiptap/extension-color": "^3.0.
|
|
65
|
-
"@tiptap/extension-document": "^3.0.
|
|
66
|
-
"@tiptap/extension-floating-menu": "^3.0.
|
|
67
|
-
"@tiptap/extension-font-family": "^3.0.
|
|
68
|
-
"@tiptap/extension-hard-break": "^3.0.
|
|
69
|
-
"@tiptap/extension-heading": "^3.0.
|
|
70
|
-
"@tiptap/extension-highlight": "^3.0.
|
|
71
|
-
"@tiptap/extension-horizontal-rule": "^3.0.
|
|
72
|
-
"@tiptap/extension-image": "^3.0.
|
|
73
|
-
"@tiptap/extension-invisible-characters": "^3.0.
|
|
74
|
-
"@tiptap/extension-italic": "^3.0.
|
|
75
|
-
"@tiptap/extension-link": "^3.0.
|
|
76
|
-
"@tiptap/extension-list": "^3.0.
|
|
77
|
-
"@tiptap/extension-list-item": "^3.0.
|
|
78
|
-
"@tiptap/extension-paragraph": "^3.0.
|
|
79
|
-
"@tiptap/extension-placeholder": "^3.0.
|
|
80
|
-
"@tiptap/extension-strike": "^3.0.
|
|
81
|
-
"@tiptap/extension-subscript": "^3.0.
|
|
82
|
-
"@tiptap/extension-superscript": "^3.0.
|
|
83
|
-
"@tiptap/extension-table": "^3.0.
|
|
84
|
-
"@tiptap/extension-task-item": "^3.0.
|
|
85
|
-
"@tiptap/extension-task-list": "^3.0.
|
|
86
|
-
"@tiptap/extension-text": "^3.0.
|
|
87
|
-
"@tiptap/extension-text-align": "^3.0.
|
|
88
|
-
"@tiptap/extension-text-style": "^3.0.
|
|
89
|
-
"@tiptap/extension-typography": "^3.0.
|
|
90
|
-
"@tiptap/extension-underline": "^3.0.
|
|
91
|
-
"@tiptap/
|
|
92
|
-
"@tiptap/
|
|
93
|
-
"@tiptap/
|
|
94
|
-
"@tiptap/
|
|
95
|
-
"@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",
|
|
96
102
|
"emoji.json": "^16.0.0",
|
|
97
103
|
"highlight.js": "^11.11.1",
|
|
98
104
|
"linkifyjs": "^4.3.2",
|
|
@@ -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,43 +64,41 @@ 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
|
})
|
|
67
74
|
</script>
|
|
68
75
|
|
|
69
76
|
<template>
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<Footer :show-words-count="showWordsCount" :show-characters-count="showCharactersCount" />
|
|
97
|
-
</div>
|
|
98
|
-
</VCol>
|
|
99
|
-
</VRow>
|
|
100
|
-
</VContainer>
|
|
77
|
+
<template v-if="toolbar">
|
|
78
|
+
<Toolbar
|
|
79
|
+
v-if="editor"
|
|
80
|
+
:variant-btn="variantBtn"
|
|
81
|
+
:variant-field="variantField"
|
|
82
|
+
:font-measure="fontMeasure"
|
|
83
|
+
:items="items"
|
|
84
|
+
:items-exclude="itemsExclude"
|
|
85
|
+
:rounded="rounded"
|
|
86
|
+
:custom-extensions="customExtensions"
|
|
87
|
+
:theme="currentTheme"
|
|
88
|
+
/>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<div :class="`border border-t-0 rounded-b-${rounded}`">
|
|
92
|
+
<div class="pa-2 tiptapify-container resizable" :style="`${height > 0 ? `height: ${height}px` : ''}`">
|
|
93
|
+
<MenuFloating v-if="floatingMenu" :variant="variantBtn" :theme="currentTheme" />
|
|
94
|
+
|
|
95
|
+
<MenuBubble v-if="bubbleMenu" :variant="variantBtn" :theme="currentTheme" />
|
|
96
|
+
|
|
97
|
+
<EditorContent :editor="editor" class="tiptapify-editor" />
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<Footer :show-words-count="showWordsCount" :show-characters-count="showCharactersCount" />
|
|
101
|
+
</div>
|
|
101
102
|
</template>
|
|
102
103
|
|
|
103
104
|
<style scoped lang="scss">
|
|
@@ -131,6 +132,11 @@ onBeforeUnmount(() => {
|
|
|
131
132
|
--border: 1px solid var(--gray-2);
|
|
132
133
|
}
|
|
133
134
|
|
|
135
|
+
.resizable {
|
|
136
|
+
resize: vertical;
|
|
137
|
+
overflow: auto;
|
|
138
|
+
}
|
|
139
|
+
|
|
134
140
|
/* Basic editor styles */
|
|
135
141
|
.tiptap {
|
|
136
142
|
:first-child {
|
|
@@ -19,8 +19,6 @@ const toolbarItemsRef: Ref<ToolbarItemSections> = ref(computed(() => props.items
|
|
|
19
19
|
<template v-for="(toolbarSection, sectionKey) in toolbarItemsRef" :key="sectionKey">
|
|
20
20
|
<Group v-if="toolbarSection.group" :variant="variantBtn" :toolbar-section="toolbarSection" />
|
|
21
21
|
|
|
22
|
-
<Toggle v-else-if="toolbarSection.toggle" :variant="variantBtn" :toolbar-section="toolbarSection" />
|
|
23
|
-
|
|
24
22
|
<VBtn
|
|
25
23
|
v-else
|
|
26
24
|
v-for="(toolbarItem, itemKey) in toolbarSection.items"
|
|
@@ -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
|
}
|
|
@@ -28,16 +28,11 @@ export function toolbarItems(
|
|
|
28
28
|
const mediaItems = ref(useMediaItems())
|
|
29
29
|
|
|
30
30
|
const allMenuItems: ToolbarItemSections = {
|
|
31
|
-
/**
|
|
32
|
-
* todo
|
|
33
|
-
*
|
|
34
|
-
* media (video)
|
|
35
|
-
*/
|
|
36
31
|
style: { group: true, items: styleItems.value },
|
|
37
32
|
format: { group: true, items: formatItems.value },
|
|
38
33
|
format_extra: { group: true, items: formatExtraItems.value },
|
|
39
34
|
media: { group: true, items: mediaItems.value },
|
|
40
|
-
alignment: {
|
|
35
|
+
alignment: { group: true, items: alignmentItems.value },
|
|
41
36
|
list: { group: true, items: listItems.value },
|
|
42
37
|
actions: { group: true, items: actionsItems.value },
|
|
43
38
|
misc: { group: true, items: miscItems.value },
|
|
@@ -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
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as mdi from "@mdi/js";
|
|
2
2
|
import Emoji from "@tiptapify/extensions/components/Emoji.vue";
|
|
3
|
-
import { computed, markRaw } from "vue";
|
|
4
|
-
import { useI18n } from "vue-i18n";
|
|
3
|
+
import { computed, inject, markRaw } from "vue";
|
|
5
4
|
|
|
6
5
|
export function useEmoji() {
|
|
7
|
-
const { t } =
|
|
6
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
8
7
|
|
|
9
8
|
return {
|
|
10
|
-
name: computed(() => t('media.emoji')),
|
|
11
|
-
tooltip: computed(() => t('media.emoji')),
|
|
9
|
+
name: computed(() => t('media.emoji.title')),
|
|
10
|
+
tooltip: computed(() => t('media.emoji.title')),
|
|
12
11
|
icon: `mdiSvg:${mdi.mdiEmoticon}`,
|
|
13
12
|
enabled: true,
|
|
14
13
|
component: markRaw(Emoji),
|
|
@@ -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
|
|