tiptapify 0.0.16 → 0.0.17
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 +2 -2
- package/dist/tiptapify.css +1 -1
- package/dist/tiptapify.mjs +24078 -25377
- package/dist/tiptapify.umd.js +38 -38
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/Tiptapify.vue +3 -3
- package/src/components/Toolbar/Index.vue +9 -30
- package/src/components/Toolbar/Items.vue +14 -29
- package/src/components/Toolbar/actions.ts +18 -0
- package/src/components/Toolbar/alignment.ts +28 -0
- package/src/components/Toolbar/format.ts +28 -0
- package/src/components/Toolbar/formatExtra.ts +33 -0
- package/src/components/Toolbar/items.ts +19 -114
- package/src/components/Toolbar/list.ts +33 -0
- package/src/components/Toolbar/media.ts +33 -0
- package/src/components/Toolbar/misc.ts +38 -0
- package/src/components/Toolbar/style.ts +38 -0
- package/src/components/editorExtensions.ts +4 -4
- package/src/components/index.ts +2 -2
- package/src/extensions/components/actions/redo/Button.vue +29 -0
- package/src/extensions/components/actions/undo/Button.vue +29 -0
- package/src/extensions/components/alignment/center/Button.vue +29 -0
- package/src/extensions/components/alignment/justify/Button.vue +29 -0
- package/src/extensions/components/alignment/left/Button.vue +29 -0
- package/src/extensions/components/alignment/right/Button.vue +29 -0
- package/src/extensions/components/format/bold/Button.vue +30 -0
- package/src/extensions/components/format/italic/Button.vue +30 -0
- package/src/extensions/components/format/strike/Button.vue +30 -0
- package/src/extensions/components/format/underline/Button.vue +30 -0
- package/src/extensions/components/formatExtra/code/Button.vue +30 -0
- package/src/extensions/components/formatExtra/codeBlock/Button.vue +30 -0
- package/src/extensions/components/formatExtra/quote/Button.vue +30 -0
- package/src/extensions/components/formatExtra/sub/Button.vue +30 -0
- package/src/extensions/components/formatExtra/sup/Button.vue +30 -0
- package/src/extensions/components/list/bullet/Button.vue +30 -0
- package/src/extensions/components/list/indent/Button.vue +30 -0
- package/src/extensions/components/list/numbered/Button.vue +30 -0
- package/src/extensions/components/list/outdent/Button.vue +30 -0
- package/src/extensions/components/list/task/Button.vue +30 -0
- package/src/extensions/components/{Emoji.vue → media/emoji/Button.vue} +63 -60
- package/src/extensions/components/media/image/Button.vue +29 -0
- package/src/extensions/components/media/link/Button.vue +31 -0
- package/src/extensions/components/media/table/Button.vue +119 -0
- package/src/extensions/components/media/table/ColumnActions.vue +52 -0
- package/src/extensions/components/media/table/RowActions.vue +52 -0
- package/src/extensions/components/media/video/Button.vue +29 -0
- package/src/extensions/components/misc/break/Button.vue +25 -0
- package/src/extensions/components/misc/formatClear/Button.vue +29 -0
- package/src/extensions/components/misc/invisibleChar/Button.vue +30 -0
- package/src/extensions/components/misc/line/Button.vue +25 -0
- package/src/extensions/components/misc/preview/Button.vue +36 -0
- package/src/extensions/components/misc/source/Button.vue +31 -0
- package/src/extensions/components/{ShowSourceDialog.vue → misc/source/ShowSourceDialog.vue} +5 -14
- package/src/extensions/components/{StyleColor.vue → style/StyleColor.vue} +5 -8
- package/src/extensions/components/style/color/Button.vue +57 -0
- package/src/extensions/components/style/fontFamily/Button.vue +60 -0
- package/src/extensions/components/style/fontFamily/FontFamily.vue +76 -0
- package/src/extensions/components/style/fontSize/Button.vue +64 -0
- package/src/extensions/components/{FontSize.vue → style/fontSize/FontSize.vue} +0 -5
- package/src/extensions/components/style/heading/Button.vue +61 -0
- package/src/extensions/components/style/highlight/Button.vue +57 -0
- package/src/extensions/components/style/lineHeight/Button.vue +60 -0
- package/src/extensions/components/{LineHeight.vue → style/lineHeight/LineHeight.vue} +0 -4
- package/src/types/toolbarSections.ts +16 -2
- package/src/components/Toolbar/Group.vue +0 -42
- package/src/components/Toolbar/GroupBtn.vue +0 -32
- package/src/components/Toolbar/GroupDropdown.vue +0 -67
- package/src/components/Toolbar/defaultExtensionComponents.ts +0 -65
- package/src/composables/Toolbar/Actions/useRedo.ts +0 -22
- package/src/composables/Toolbar/Actions/useUndo.ts +0 -22
- package/src/composables/Toolbar/Alignment/useAlignmentCenter.ts +0 -23
- package/src/composables/Toolbar/Alignment/useAlignmentJustify.ts +0 -23
- package/src/composables/Toolbar/Alignment/useAlignmentLeft.ts +0 -23
- package/src/composables/Toolbar/Alignment/useAlignmentRight.ts +0 -23
- package/src/composables/Toolbar/Format/useBold.ts +0 -23
- package/src/composables/Toolbar/Format/useItalic.ts +0 -23
- package/src/composables/Toolbar/Format/useStrike.ts +0 -23
- package/src/composables/Toolbar/Format/useUnderline.ts +0 -23
- package/src/composables/Toolbar/FormatExtra/useBlockquote.ts +0 -23
- package/src/composables/Toolbar/FormatExtra/useCode.ts +0 -23
- package/src/composables/Toolbar/FormatExtra/useCodeBlock.ts +0 -23
- package/src/composables/Toolbar/FormatExtra/useSub.ts +0 -23
- package/src/composables/Toolbar/FormatExtra/useSup.ts +0 -23
- package/src/composables/Toolbar/List/useBullet.ts +0 -22
- package/src/composables/Toolbar/List/useIndent.ts +0 -23
- package/src/composables/Toolbar/List/useNumbered.ts +0 -22
- package/src/composables/Toolbar/List/useOutdent.ts +0 -23
- package/src/composables/Toolbar/List/useTask.ts +0 -22
- package/src/composables/Toolbar/Media/useEmoji.ts +0 -19
- package/src/composables/Toolbar/Media/useImage.ts +0 -23
- package/src/composables/Toolbar/Media/useLink.ts +0 -23
- package/src/composables/Toolbar/Media/useTable.ts +0 -187
- package/src/composables/Toolbar/Media/useVideo.ts +0 -22
- package/src/composables/Toolbar/Misc/useBreak.ts +0 -20
- package/src/composables/Toolbar/Misc/useFormatClear.ts +0 -22
- package/src/composables/Toolbar/Misc/useInvisibleCharacters.ts +0 -22
- package/src/composables/Toolbar/Misc/useLine.ts +0 -20
- package/src/composables/Toolbar/Misc/usePreview.ts +0 -19
- package/src/composables/Toolbar/Misc/useSource.ts +0 -20
- package/src/composables/Toolbar/Style/useColor.ts +0 -35
- package/src/composables/Toolbar/Style/useFontFamily.ts +0 -48
- package/src/composables/Toolbar/Style/useFontSize.ts +0 -49
- package/src/composables/Toolbar/Style/useHeading.ts +0 -63
- package/src/composables/Toolbar/Style/useHighlight.ts +0 -35
- package/src/composables/Toolbar/Style/useLineHeight.ts +0 -48
- package/src/composables/Toolbar/useActionsItems.ts +0 -9
- package/src/composables/Toolbar/useAlignmentItems.ts +0 -13
- package/src/composables/Toolbar/useFormatExtraItems.ts +0 -15
- package/src/composables/Toolbar/useFormatItems.ts +0 -13
- package/src/composables/Toolbar/useListItems.ts +0 -15
- package/src/composables/Toolbar/useMediaItems.ts +0 -15
- package/src/composables/Toolbar/useMiscItems.ts +0 -17
- package/src/composables/Toolbar/useStyleItems.ts +0 -17
- package/src/extensions/components/PreviewDialog.vue +0 -43
- package/src/types/extensionComponents.ts +0 -22
- package/src/types/toolbarItems.ts +0 -41
- /package/src/extensions/components/{ImageDialog.vue → media/image/ImageDialog.vue} +0 -0
- /package/src/extensions/{image.ts → components/media/image/image.ts} +0 -0
- /package/src/extensions/components/{LinkDialog.vue → media/link/LinkDialog.vue} +0 -0
- /package/src/extensions/{link.ts → components/media/link/link.ts} +0 -0
- /package/src/extensions/components/{TableBuilder.vue → media/table/TableBuilder.vue} +0 -0
- /package/src/extensions/components/{VideoDialog.vue → media/video/VideoDialog.vue} +0 -0
- /package/src/extensions/components/{FontFamily.vue → style/lineHeight/FontFamily.vue} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:disabled="!editor.can().chain().focus().undo().run()"
|
|
17
|
+
@click="editor.chain().focus().undo().run()"
|
|
18
|
+
size="32"
|
|
19
|
+
>
|
|
20
|
+
<VTooltip activator="parent">
|
|
21
|
+
{{ t('action.undo') }}
|
|
22
|
+
</VTooltip>
|
|
23
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiUndo}`" />
|
|
24
|
+
</VBtn>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style lang="scss" scoped>
|
|
28
|
+
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive({ textAlign: 'center' }) ? 'primary' : ''"
|
|
17
|
+
@click="editor.chain().focus().toggleTextAlign('center').run()"
|
|
18
|
+
size="32"
|
|
19
|
+
>
|
|
20
|
+
<VTooltip activator="parent">
|
|
21
|
+
{{ t('alignments.center') }}
|
|
22
|
+
</VTooltip>
|
|
23
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatAlignCenter}`" />
|
|
24
|
+
</VBtn>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style lang="scss" scoped>
|
|
28
|
+
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive({ textAlign: 'justify' }) ? 'primary' : ''"
|
|
17
|
+
@click="editor.chain().focus().toggleTextAlign('justify').run()"
|
|
18
|
+
size="32"
|
|
19
|
+
>
|
|
20
|
+
<VTooltip activator="parent">
|
|
21
|
+
{{ t('alignments.justify') }}
|
|
22
|
+
</VTooltip>
|
|
23
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatAlignJustify}`" />
|
|
24
|
+
</VBtn>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style lang="scss" scoped>
|
|
28
|
+
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive({ textAlign: 'left' }) ? 'primary' : ''"
|
|
17
|
+
@click="editor.chain().focus().toggleTextAlign('left').run()"
|
|
18
|
+
size="32"
|
|
19
|
+
>
|
|
20
|
+
<VTooltip activator="parent">
|
|
21
|
+
{{ t('alignments.left') }}
|
|
22
|
+
</VTooltip>
|
|
23
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatAlignLeft}`" />
|
|
24
|
+
</VBtn>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style lang="scss" scoped>
|
|
28
|
+
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive({ textAlign: 'right' }) ? 'primary' : ''"
|
|
17
|
+
@click="editor.chain().focus().toggleTextAlign('right').run()"
|
|
18
|
+
size="32"
|
|
19
|
+
>
|
|
20
|
+
<VTooltip activator="parent">
|
|
21
|
+
{{ t('alignments.right') }}
|
|
22
|
+
</VTooltip>
|
|
23
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatAlignRight}`" />
|
|
24
|
+
</VBtn>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style lang="scss" scoped>
|
|
28
|
+
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('bold') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleBold().run()"
|
|
18
|
+
@click="editor.commands.toggleBold()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.bold') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatBold}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('italic') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleItalic().run()"
|
|
18
|
+
@click="editor.commands.toggleItalic()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.italic') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatItalic}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('strike') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleStrike().run()"
|
|
18
|
+
@click="editor.commands.toggleStrike()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.strike') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatStrikethroughVariant}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('underline') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleUnderline().run()"
|
|
18
|
+
@click="editor.commands.toggleUnderline()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.strike') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatUnderline}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('code') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleCode().run()"
|
|
18
|
+
@click="editor.commands.toggleCode()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.code') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiXml}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('codeBlock') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleCodeBlock().run()"
|
|
18
|
+
@click="editor.commands.toggleCodeBlock()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.codeblock') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiCodeBlockTags}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('blockquote') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleBlockquote().run()"
|
|
18
|
+
@click="editor.commands.toggleBlockquote()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.blockquote') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiCommentQuote}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('sub') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleSubscript().run()"
|
|
18
|
+
@click="editor.commands.toggleSubscript()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.sub') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatSubscript}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('sup') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleSuperscript().run()"
|
|
18
|
+
@click="editor.commands.toggleSuperscript()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('format.sup') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatSuperscript}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('bulletList') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleBulletList().run()"
|
|
18
|
+
@click="editor.commands.toggleBulletList()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('lists.bullet') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListBulleted}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:active="false"
|
|
17
|
+
:disabled="!editor.can().sinkListItem('listItem')"
|
|
18
|
+
@click="editor.chain().focus().sinkListItem('listItem').run()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('lists.indent') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatIndentIncrease}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('orderedList') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleOrderedList().run()"
|
|
18
|
+
@click="editor.commands.toggleOrderedList()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('lists.numbered') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListNumbered}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:active="false"
|
|
17
|
+
:disabled="!editor.can().liftListItem('listItem')"
|
|
18
|
+
@click="editor.chain().focus().liftListItem('listItem').run()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('lists.outdent') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatIndentDecrease}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
import * as mdi from '@mdi/js'
|
|
4
|
+
import { Editor } from "@tiptap/vue-3";
|
|
5
|
+
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
|
+
import { inject, Ref } from "vue";
|
|
7
|
+
|
|
8
|
+
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
|
+
|
|
10
|
+
const { t } = inject('tiptapifyI18n') as any
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VBtn
|
|
16
|
+
:color="editor.isActive('taskList') ? 'primary' : ''"
|
|
17
|
+
:disabled="!editor.can().chain().focus().toggleTaskList().run()"
|
|
18
|
+
@click="editor.commands.toggleTaskList()"
|
|
19
|
+
size="32"
|
|
20
|
+
>
|
|
21
|
+
<VTooltip activator="parent">
|
|
22
|
+
{{ t('lists.task') }}
|
|
23
|
+
</VTooltip>
|
|
24
|
+
<BtnIcon :icon="`mdiSvg:${mdi.mdiFormatListChecks}`" />
|
|
25
|
+
</VBtn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
|
|
30
|
+
</style>
|