tiptapify 0.1.3 → 0.1.5
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/dist/tiptapify.css +2 -1
- package/dist/tiptapify.mjs +64316 -50753
- package/dist/tiptapify.umd.js +88 -78
- package/index.d.ts +97 -40
- package/package.json +65 -66
- package/src/components/Footer.vue +4 -3
- package/src/components/MenuBubble.vue +16 -16
- package/src/components/MenuFloating.vue +13 -13
- package/src/components/Tiptapify.vue +31 -16
- package/src/components/Toolbar/Index.vue +21 -17
- package/src/components/Toolbar/Items.vue +9 -8
- package/src/components/Toolbar/actions.ts +3 -3
- package/src/components/Toolbar/alignment.ts +5 -5
- package/src/components/Toolbar/format.ts +5 -5
- package/src/components/Toolbar/formatExtra.ts +6 -6
- package/src/components/Toolbar/items.ts +8 -8
- package/src/components/Toolbar/list.ts +6 -6
- package/src/components/Toolbar/media.ts +8 -8
- package/src/components/Toolbar/misc.ts +8 -8
- package/src/components/Toolbar/style.ts +7 -7
- package/src/components/UI/TiptapifyDialog.vue +14 -13
- package/src/components/editorExtensions.ts +2 -2
- package/src/components/index.ts +6 -6
- package/src/constants/style.ts +4 -3
- package/src/extensions/charmap/arrows.ts +700 -700
- package/src/extensions/charmap/box_drawing.ts +184 -184
- package/src/extensions/charmap/currency.ts +93 -93
- package/src/extensions/charmap/cyrillic.ts +368 -368
- package/src/extensions/charmap/diacritics.ts +60 -60
- package/src/extensions/charmap/extended_letters.ts +748 -748
- package/src/extensions/charmap/greek.ts +252 -252
- package/src/extensions/charmap/hebrew.ts +105 -105
- package/src/extensions/charmap/math.ts +1684 -1684
- package/src/extensions/charmap/punctuation.ts +68 -68
- package/src/extensions/charmap/symbols.ts +288 -288
- package/src/extensions/charmap/typography.ts +284 -284
- package/src/extensions/components/CodeBlockComponent.vue +2 -2
- package/src/extensions/components/actions/redo/Button.vue +12 -10
- package/src/extensions/components/actions/undo/Button.vue +12 -10
- package/src/extensions/components/alignment/center/Button.vue +11 -9
- package/src/extensions/components/alignment/justify/Button.vue +11 -9
- package/src/extensions/components/alignment/left/Button.vue +11 -9
- package/src/extensions/components/alignment/right/Button.vue +11 -9
- package/src/extensions/components/format/bold/Button.vue +12 -10
- package/src/extensions/components/format/italic/Button.vue +12 -10
- package/src/extensions/components/format/strike/Button.vue +12 -10
- package/src/extensions/components/format/underline/Button.vue +5 -3
- package/src/extensions/components/formatExtra/code/Button.vue +12 -10
- package/src/extensions/components/formatExtra/codeBlock/Button.vue +12 -10
- package/src/extensions/components/formatExtra/quote/Button.vue +12 -10
- package/src/extensions/components/formatExtra/sub/Button.vue +12 -10
- package/src/extensions/components/formatExtra/sup/Button.vue +12 -10
- package/src/extensions/components/list/bullet/Button.vue +21 -19
- package/src/extensions/components/list/bullet/index.ts +1 -1
- package/src/extensions/components/list/indent/Button.vue +13 -11
- package/src/extensions/components/list/numbered/Button.vue +12 -10
- package/src/extensions/components/list/outdent/Button.vue +13 -11
- package/src/extensions/components/list/task/Button.vue +12 -10
- package/src/extensions/components/media/charmap/Button.vue +8 -5
- package/src/extensions/components/media/charmap/Picker.vue +20 -18
- package/src/extensions/components/media/emoji/Button.vue +8 -6
- package/src/extensions/components/media/emoji/Picker.vue +20 -18
- package/src/extensions/components/media/iframe/Button.vue +13 -11
- package/src/extensions/components/media/iframe/IframeDialog.vue +27 -25
- package/src/extensions/components/media/image/Button.vue +12 -10
- package/src/extensions/components/media/image/ImageDialog.vue +46 -42
- package/src/extensions/components/media/link/Button.vue +12 -11
- package/src/extensions/components/media/link/LinkDialog.vue +34 -32
- package/src/extensions/components/media/link/index.ts +6 -7
- package/src/extensions/components/media/table/Button.vue +21 -19
- package/src/extensions/components/media/table/ColumnActions.vue +5 -4
- package/src/extensions/components/media/table/RowActions.vue +5 -4
- package/src/extensions/components/media/table/TableBuilder.vue +15 -13
- package/src/extensions/components/media/video/Button.vue +12 -10
- package/src/extensions/components/media/video/VideoDialog.vue +33 -15
- package/src/extensions/components/misc/break/Button.vue +8 -6
- package/src/extensions/components/misc/formatClear/Button.vue +12 -10
- package/src/extensions/components/misc/fullscreen/Button.vue +20 -18
- package/src/extensions/components/misc/invisibleChar/Button.vue +11 -9
- package/src/extensions/components/misc/line/Button.vue +11 -9
- package/src/extensions/components/misc/preview/Button.vue +11 -9
- package/src/extensions/components/misc/source/Button.vue +9 -7
- package/src/extensions/components/misc/source/ShowSourceDialog.vue +27 -25
- package/src/extensions/components/slashCommands/CommandsList.vue +3 -1
- package/src/extensions/components/style/StyleColor.vue +26 -22
- package/src/extensions/components/style/color/Button.vue +19 -17
- package/src/extensions/components/style/fontFamily/Button.vue +16 -14
- package/src/extensions/components/style/fontFamily/FontFamily.vue +3 -2
- package/src/extensions/components/style/fontSize/Button.vue +17 -15
- package/src/extensions/components/style/fontSize/FontSize.vue +4 -3
- package/src/extensions/components/style/heading/Button.vue +19 -16
- package/src/extensions/components/style/highlight/Button.vue +19 -17
- package/src/extensions/components/style/lineHeight/Button.vue +16 -14
- package/src/extensions/components/style/lineHeight/FontFamily.vue +3 -2
- package/src/extensions/components/style/lineHeight/LineHeight.vue +3 -2
- package/src/extensions/emoji/activities.ts +534 -534
- package/src/extensions/emoji/animals_and_nature.ts +978 -978
- package/src/extensions/emoji/component.ts +54 -54
- package/src/extensions/emoji/flags.ts +1644 -1644
- package/src/extensions/emoji/food_and_drink.ts +810 -810
- package/src/extensions/emoji/objects.ts +1608 -1608
- package/src/extensions/emoji/people_and_body.ts +2022 -2022
- package/src/extensions/emoji/smileys_and_emotion.ts +1038 -1038
- package/src/extensions/emoji/symbols.ts +1290 -1290
- package/src/extensions/emoji/travel_and_places.ts +1332 -1332
- package/src/index.ts +15 -5
- package/src/types/editor.ts +10 -0
- package/src/types/slashCommandsTypes.ts +1 -1
- package/src/types/toolbarTypes.ts +3 -1
- package/src/utils/helpers.ts +1 -1
|
@@ -20,14 +20,14 @@ const selectedLanguage = computed({
|
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
22
|
<NodeViewWrapper class="code-block">
|
|
23
|
-
<select
|
|
23
|
+
<select v-model="selectedLanguage" contenteditable="false">
|
|
24
24
|
<option :value="null">
|
|
25
25
|
auto
|
|
26
26
|
</option>
|
|
27
27
|
<option disabled>
|
|
28
28
|
—
|
|
29
29
|
</option>
|
|
30
|
-
<option v-for="(language, index) in languages" :
|
|
30
|
+
<option v-for="(language, index) in languages" :key="index" :value="language">
|
|
31
31
|
{{ language }}
|
|
32
32
|
</option>
|
|
33
33
|
</select>
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:disabled="!editor.can().chain().focus().redo().run()"
|
|
25
|
+
size="32"
|
|
26
|
+
color=""
|
|
27
|
+
:variant="variantBtn"
|
|
28
|
+
@click="editor.chain().focus().redo().run()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('action.redo') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:disabled="!editor.can().chain().focus().undo().run()"
|
|
25
|
+
size="32"
|
|
26
|
+
color=""
|
|
27
|
+
:variant="variantBtn"
|
|
28
|
+
@click="editor.chain().focus().undo().run()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('action.undo') }}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
:color="editor.isActive({ textAlign: 'center' }) ? 'primary' : ''"
|
|
25
|
+
:variant="variantBtn"
|
|
26
|
+
size="32"
|
|
27
|
+
@click="editor.chain().focus().toggleTextAlign('center').run()"
|
|
26
28
|
>
|
|
27
29
|
<VTooltip activator="parent">
|
|
28
30
|
{{ t('alignments.center') }}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
:color="editor.isActive({ textAlign: 'justify' }) ? 'primary' : ''"
|
|
25
|
+
:variant="variantBtn"
|
|
26
|
+
size="32"
|
|
27
|
+
@click="editor.chain().focus().toggleTextAlign('justify').run()"
|
|
26
28
|
>
|
|
27
29
|
<VTooltip activator="parent">
|
|
28
30
|
{{ t('alignments.justify') }}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
:color="editor.isActive({ textAlign: 'left' }) ? 'primary' : ''"
|
|
25
|
+
:variant="variantBtn"
|
|
26
|
+
size="32"
|
|
27
|
+
@click="editor.chain().focus().toggleTextAlign('left').run()"
|
|
26
28
|
>
|
|
27
29
|
<VTooltip activator="parent">
|
|
28
30
|
{{ t('alignments.left') }}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
:color="editor.isActive({ textAlign: 'right' }) ? 'primary' : ''"
|
|
25
|
+
:variant="variantBtn"
|
|
26
|
+
size="32"
|
|
27
|
+
@click="editor.chain().focus().toggleTextAlign('right').run()"
|
|
26
28
|
>
|
|
27
29
|
<VTooltip activator="parent">
|
|
28
30
|
{{ t('alignments.right') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('bold') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleBold().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleBold()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.bold') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('italic') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleItalic().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleItalic()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.italic') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('strike') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleStrike().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleStrike()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.strike') }}
|
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
4
|
import { Editor } from '@tiptap/vue-3'
|
|
5
5
|
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
-
import {
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('code') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleCode().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleCode()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.code') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('codeBlock') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleCodeBlock().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleCodeBlock()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.codeblock') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('blockquote') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleBlockquote().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleBlockquote()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.blockquote') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('sub') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleSubscript().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleSubscript()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.sub') }}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
|
-
import { Editor } from
|
|
5
|
-
import BtnIcon from
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/vue-3'
|
|
5
|
+
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import { variantBtnTypes } from '@tiptapify/types/editor'
|
|
7
|
+
import { inject, PropType, Ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
import { ComposerTranslation } from 'vue-i18n'
|
|
9
11
|
|
|
10
12
|
defineProps({
|
|
11
|
-
variantBtn: { type: String
|
|
13
|
+
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
15
17
|
|
|
16
|
-
const { t } = inject('tiptapifyI18n') as
|
|
18
|
+
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
17
19
|
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
22
|
<template>
|
|
21
23
|
<VBtn
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
:color="editor.isActive('sup') ? 'primary' : ''"
|
|
25
|
+
:disabled="!editor.can().chain().focus().toggleSuperscript().run()"
|
|
26
|
+
:variant="variantBtn"
|
|
27
|
+
size="32"
|
|
28
|
+
@click="editor.commands.toggleSuperscript()"
|
|
27
29
|
>
|
|
28
30
|
<VTooltip activator="parent">
|
|
29
31
|
{{ t('format.sup') }}
|