tiptapify 0.2.6 → 0.3.1
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.mjs +23430 -25369
- package/dist/tiptapify.umd.js +70 -73
- package/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/components/Footer.vue +1 -1
- package/src/components/Tiptapify.vue +6 -2
- package/src/components/Toolbar/Index.vue +3 -4
- package/src/components/Toolbar/Items.test.ts +53 -0
- package/src/components/Toolbar/Items.vue +5 -5
- package/src/components/UI/HotkeyTooltip.test.ts +65 -0
- package/src/components/UI/HotkeyTooltip.vue +54 -0
- package/src/components/UI/Tooltip.vue +20 -0
- package/src/composables/useTiptapifyConfig.test.ts +66 -0
- package/src/composables/useTiptapifyConfig.ts +17 -0
- package/src/constants/defaults.ts +4 -2
- package/src/extensions/components/actions/redo/Button.vue +5 -9
- package/src/extensions/components/actions/undo/Button.vue +5 -9
- package/src/extensions/components/ai/Button.vue +7 -10
- package/src/extensions/components/ai/Dialog.vue +4 -9
- package/src/extensions/components/alignment/center/Button.vue +5 -9
- package/src/extensions/components/alignment/justify/Button.vue +5 -9
- package/src/extensions/components/alignment/left/Button.vue +5 -9
- package/src/extensions/components/alignment/right/Button.vue +5 -9
- package/src/extensions/components/format/bold/Button.vue +5 -9
- package/src/extensions/components/format/italic/Button.vue +5 -9
- package/src/extensions/components/format/strike/Button.vue +5 -9
- package/src/extensions/components/format/underline/Button.vue +5 -9
- package/src/extensions/components/formatExtra/code/Button.vue +5 -9
- package/src/extensions/components/formatExtra/codeBlock/Button.vue +5 -9
- package/src/extensions/components/formatExtra/quote/Button.vue +5 -9
- package/src/extensions/components/formatExtra/sub/Button.vue +5 -9
- package/src/extensions/components/formatExtra/sup/Button.vue +5 -9
- package/src/extensions/components/list/bullet/Button.vue +8 -13
- package/src/extensions/components/list/indent/Button.vue +5 -9
- package/src/extensions/components/list/numbered/Button.vue +5 -9
- package/src/extensions/components/list/outdent/Button.vue +5 -9
- package/src/extensions/components/list/task/Button.vue +5 -9
- package/src/extensions/components/media/charmap/Button.vue +5 -8
- package/src/extensions/components/media/charmap/Picker.vue +2 -3
- package/src/extensions/components/media/emoji/Button.vue +6 -9
- package/src/extensions/components/media/emoji/Picker.vue +2 -3
- package/src/extensions/components/media/iframe/Button.vue +6 -10
- package/src/extensions/components/media/iframe/IframeDialog.vue +3 -7
- package/src/extensions/components/media/image/Button.vue +6 -10
- package/src/extensions/components/media/image/ImageDialog.vue +5 -10
- package/src/extensions/components/media/link/Button.vue +7 -10
- package/src/extensions/components/media/link/LinkDialog.vue +3 -7
- package/src/extensions/components/media/table/Button.vue +10 -24
- package/src/extensions/components/media/table/ColumnActions.vue +4 -9
- package/src/extensions/components/media/table/RowActions.vue +4 -9
- package/src/extensions/components/media/video/Button.vue +6 -10
- package/src/extensions/components/media/video/VideoDialog.vue +3 -7
- package/src/extensions/components/misc/break/Button.vue +5 -9
- package/src/extensions/components/misc/formatClear/Button.vue +5 -9
- package/src/extensions/components/misc/fullscreen/Button.vue +5 -9
- package/src/extensions/components/misc/invisibleChar/Button.vue +5 -9
- package/src/extensions/components/misc/line/Button.vue +5 -9
- package/src/extensions/components/misc/preview/Button.vue +5 -9
- package/src/extensions/components/misc/source/Button.vue +6 -10
- package/src/extensions/components/misc/source/ShowSourceDialog.vue +4 -5
- package/src/extensions/components/style/color/Button.vue +5 -9
- package/src/extensions/components/style/fontFamily/Button.vue +5 -9
- package/src/extensions/components/style/fontSize/Button.vue +6 -7
- package/src/extensions/components/style/heading/Button.vue +6 -8
- package/src/extensions/components/style/highlight/Button.vue +5 -9
- package/src/extensions/components/style/lineHeight/Button.vue +5 -9
- package/src/index.ts +3 -0
- package/src/utils/hotkeys.test.ts +146 -0
- package/src/utils/hotkeys.ts +65 -0
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -26,9 +24,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
26
24
|
size="32"
|
|
27
25
|
@click="editor.chain().focus().toggleTextAlign('left').run()"
|
|
28
26
|
>
|
|
29
|
-
<
|
|
30
|
-
{{ t('alignments.left') }}
|
|
31
|
-
</VTooltip>
|
|
27
|
+
<Tooltip :label="t('alignments.left')" hotkey="Mod-Shift-l" />
|
|
32
28
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatAlignLeft}`" />
|
|
33
29
|
</VBtn>
|
|
34
30
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -26,9 +24,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
26
24
|
size="32"
|
|
27
25
|
@click="editor.chain().focus().toggleTextAlign('right').run()"
|
|
28
26
|
>
|
|
29
|
-
<
|
|
30
|
-
{{ t('alignments.right') }}
|
|
31
|
-
</VTooltip>
|
|
27
|
+
<Tooltip :label="t('alignments.right')" hotkey="Mod-Shift-r" />
|
|
32
28
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatAlignRight}`" />
|
|
33
29
|
</VBtn>
|
|
34
30
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleBold()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.bold') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.bold')" hotkey="Mod-b" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatBold}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleItalic()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.italic') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.italic')" hotkey="Mod-i" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatItalic}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleStrike()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.strike') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.strike')" hotkey="Mod-Shift-s" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatStrikethroughVariant}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleUnderline()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.underline') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.underline')" hotkey="Mod-u" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatUnderline}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleCode()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.code') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.code')" hotkey="Mod-e" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiXml}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleCodeBlock()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.codeblock') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.codeblock')" hotkey="Mod-Alt-c" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiCodeBlockTags}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleBlockquote()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.blockquote') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.blockquote')" hotkey="Mod-Shift-b" />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiCommentQuote}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleSubscript()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.sub') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.sub')" hotkey="Mod-," />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatSubscript}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -27,9 +25,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
27
25
|
size="32"
|
|
28
26
|
@click="editor.commands.toggleSuperscript()"
|
|
29
27
|
>
|
|
30
|
-
<
|
|
31
|
-
{{ t('format.sup') }}
|
|
32
|
-
</VTooltip>
|
|
28
|
+
<Tooltip :label="t('format.sup')" hotkey="Mod-." />
|
|
33
29
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatSuperscript}`" />
|
|
34
30
|
</VBtn>
|
|
35
31
|
</template>
|
|
@@ -3,19 +3,20 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { computed, inject, ref, Ref, watch } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
12
|
const props = defineProps({
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
13
|
withDisc: { type: Boolean, default: true },
|
|
15
14
|
withCircle: { type: Boolean, default: true },
|
|
16
15
|
withSquare: { type: Boolean, default: true }
|
|
17
16
|
})
|
|
18
17
|
|
|
18
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
19
|
+
|
|
19
20
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
20
21
|
|
|
21
22
|
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
@@ -91,9 +92,7 @@ watch(() => bulletLists.value, () => {
|
|
|
91
92
|
v-bind="menuProps"
|
|
92
93
|
size="32"
|
|
93
94
|
>
|
|
94
|
-
<
|
|
95
|
-
{{ t('lists.bullet') }}
|
|
96
|
-
</VTooltip>
|
|
95
|
+
<Tooltip :label="t('lists.bullet')" hotkey="Mod-Shift-8" />
|
|
97
96
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListBulleted}`" />
|
|
98
97
|
</VBtn>
|
|
99
98
|
</template>
|
|
@@ -106,9 +105,7 @@ watch(() => bulletLists.value, () => {
|
|
|
106
105
|
:active="editor.isActive(bulletList.name)"
|
|
107
106
|
@click="toggleList(bulletList.name)"
|
|
108
107
|
>
|
|
109
|
-
<
|
|
110
|
-
{{ t('lists.bullet') }}
|
|
111
|
-
</VTooltip>
|
|
108
|
+
<Tooltip :label="t('lists.bullet')" />
|
|
112
109
|
<VListItemTitle class="d-flex justify-center align-center">
|
|
113
110
|
<BtnIcon :icon="bulletList.icon" />
|
|
114
111
|
</VListItemTitle>
|
|
@@ -124,9 +121,7 @@ watch(() => bulletLists.value, () => {
|
|
|
124
121
|
size="32"
|
|
125
122
|
@click="editor.commands.toggleBulletList()"
|
|
126
123
|
>
|
|
127
|
-
<
|
|
128
|
-
{{ t('lists.bullet') }}
|
|
129
|
-
</VTooltip>
|
|
124
|
+
<Tooltip :label="t('lists.bullet')" hotkey="Mod-Shift-8" />
|
|
130
125
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListBulleted}`" />
|
|
131
126
|
</VBtn>
|
|
132
127
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -28,9 +26,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
28
26
|
:variant="variantBtn"
|
|
29
27
|
@click="editor.chain().focus().sinkListItem('listItem').run()"
|
|
30
28
|
>
|
|
31
|
-
<
|
|
32
|
-
{{ t('lists.indent') }}
|
|
33
|
-
</VTooltip>
|
|
29
|
+
<Tooltip :label="t('lists.indent')" />
|
|
34
30
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatIndentIncrease}`" />
|
|
35
31
|
</VBtn>
|
|
36
32
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { computed, inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -34,9 +32,7 @@ const buttonDisabled = computed(() => {
|
|
|
34
32
|
size="32"
|
|
35
33
|
@click="editor.commands.toggleOrderedList()"
|
|
36
34
|
>
|
|
37
|
-
<
|
|
38
|
-
{{ t('lists.numbered') }}
|
|
39
|
-
</VTooltip>
|
|
35
|
+
<Tooltip :label="t('lists.numbered')" hotkey="Mod-Shift-7" />
|
|
40
36
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListNumbered}`" />
|
|
41
37
|
</VBtn>
|
|
42
38
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -28,9 +26,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
28
26
|
:variant="variantBtn"
|
|
29
27
|
@click="editor.chain().focus().liftListItem('listItem').run()"
|
|
30
28
|
>
|
|
31
|
-
<
|
|
32
|
-
{{ t('lists.outdent') }}
|
|
33
|
-
</VTooltip>
|
|
29
|
+
<Tooltip :label="t('lists.outdent')" />
|
|
34
30
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatIndentDecrease}`" />
|
|
35
31
|
</VBtn>
|
|
36
32
|
</template>
|
|
@@ -3,15 +3,13 @@
|
|
|
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
|
|
7
|
-
import {
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
7
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
8
|
+
import { computed, inject, Ref } from 'vue'
|
|
8
9
|
|
|
9
|
-
import defaults from '@tiptapify/constants/defaults'
|
|
10
10
|
import { ComposerTranslation } from 'vue-i18n'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
14
|
-
})
|
|
12
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
15
13
|
|
|
16
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
17
15
|
|
|
@@ -34,9 +32,7 @@ const buttonDisabled = computed(() => {
|
|
|
34
32
|
size="32"
|
|
35
33
|
@click="editor.commands.toggleTaskList()"
|
|
36
34
|
>
|
|
37
|
-
<
|
|
38
|
-
{{ t('lists.task') }}
|
|
39
|
-
</VTooltip>
|
|
35
|
+
<Tooltip :label="t('lists.task')" hotkey="Mod-Shift-9" />
|
|
40
36
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListChecks}`" />
|
|
41
37
|
</VBtn>
|
|
42
38
|
</template>
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import * as mdi from '@mdi/js'
|
|
3
3
|
import { Editor } from '@tiptap/core'
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
5
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
6
|
+
import { inject, Ref } from 'vue'
|
|
6
7
|
import { ComposerTranslation } from 'vue-i18n'
|
|
7
8
|
import CharmapPicker from './Picker.vue'
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return 'flat' } },
|
|
11
|
-
})
|
|
10
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
12
11
|
|
|
13
12
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
14
13
|
const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
@@ -16,9 +15,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
16
15
|
|
|
17
16
|
<template>
|
|
18
17
|
<VBtn :id="`tiptapify-charmap-button-${editor.instanceId}`" :variant="variantBtn" size="32">
|
|
19
|
-
<
|
|
20
|
-
{{ t('media.charmap.title') }}
|
|
21
|
-
</VTooltip>
|
|
18
|
+
<Tooltip :label="t('media.charmap.title')" />
|
|
22
19
|
<VIcon :icon="`mdiSvg:${mdi.mdiAppleKeyboardCommand}`" tag="svg" size="small" />
|
|
23
20
|
</VBtn>
|
|
24
21
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Editor } from '@tiptap/core'
|
|
3
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
3
4
|
import tiptapifyCharMap from '@tiptapify/extensions/charmap'
|
|
4
5
|
import { PickerEventBus } from '@tiptapify/extensions/PickerEventBus'
|
|
5
6
|
import { computed, ref, watch } from 'vue'
|
|
@@ -71,9 +72,7 @@ watch(filter, filterChars)
|
|
|
71
72
|
:class="['tiptapify-slash-picker__tab', { 'tiptapify-slash-picker__tab--active': activeTab === item.group }]"
|
|
72
73
|
@click="activeTab = item.group"
|
|
73
74
|
>
|
|
74
|
-
<
|
|
75
|
-
{{ t(`media.charmap.categories.${item.group}`) }}
|
|
76
|
-
</VTooltip>
|
|
75
|
+
<Tooltip :label="t(`media.charmap.categories.${item.group}`)" />
|
|
77
76
|
{{ item.items[0]?.char }}
|
|
78
77
|
</button>
|
|
79
78
|
</div>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import * as mdi from '@mdi/js'
|
|
3
|
-
import { TiptapifyEditor
|
|
4
|
-
import { inject,
|
|
3
|
+
import { TiptapifyEditor } from '@tiptapify/types/editor'
|
|
4
|
+
import { inject, Ref } from 'vue'
|
|
5
5
|
import BtnIcon from '@tiptapify/components/UI/BtnIcon.vue'
|
|
6
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
6
7
|
import { ComposerTranslation } from 'vue-i18n'
|
|
7
8
|
import EmojiPicker from './Picker.vue'
|
|
8
|
-
import
|
|
9
|
+
import { useTiptapifyConfig } from '@tiptapify/composables/useTiptapifyConfig'
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
variantBtn: { type: String as PropType<variantBtnTypes>, default() { return defaults.variantBtn } },
|
|
12
|
-
})
|
|
11
|
+
const { variantBtn } = useTiptapifyConfig()
|
|
13
12
|
|
|
14
13
|
const editor = inject('tiptapifyEditor') as Ref<TiptapifyEditor>
|
|
15
14
|
|
|
@@ -18,9 +17,7 @@ const { t } = inject('tiptapifyI18n') as { t: ComposerTranslation }
|
|
|
18
17
|
|
|
19
18
|
<template>
|
|
20
19
|
<VBtn :id="`tiptapify-emoji-button-${editor.instanceId}`" color="" :variant="variantBtn" size="32">
|
|
21
|
-
<
|
|
22
|
-
{{ t('media.emoji.title') }}
|
|
23
|
-
</VTooltip>
|
|
20
|
+
<Tooltip :label="t('media.emoji.title')" />
|
|
24
21
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiEmoticon}`" />
|
|
25
22
|
</VBtn>
|
|
26
23
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Editor } from '@tiptap/core'
|
|
3
|
+
import Tooltip from '@tiptapify/components/UI/Tooltip.vue'
|
|
3
4
|
import tiptapifyEmojis from '@tiptapify/extensions/emoji'
|
|
4
5
|
import { PickerEventBus } from '@tiptapify/extensions/PickerEventBus'
|
|
5
6
|
import { computed, ref, watch } from 'vue'
|
|
@@ -67,9 +68,7 @@ watch(filter, filterEmoji)
|
|
|
67
68
|
:class="['tiptapify-slash-picker__tab', { 'tiptapify-slash-picker__tab--active': activeTab === item.group }]"
|
|
68
69
|
@click="activeTab = item.group"
|
|
69
70
|
>
|
|
70
|
-
<
|
|
71
|
-
{{ t(`media.emoji.categories.${item.group}`) }}
|
|
72
|
-
</VTooltip>
|
|
71
|
+
<Tooltip :label="t(`media.emoji.categories.${item.group}`)" />
|
|
73
72
|
{{ item.emojis[0]?.char }}
|
|
74
73
|
</button>
|
|
75
74
|
</div>
|