tiptapify 0.0.22 → 0.0.25
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 +39 -3
- package/dist/tiptapify.css +1 -1
- package/dist/tiptapify.mjs +22765 -22309
- package/dist/tiptapify.umd.js +53 -38
- package/index.d.ts +2 -2
- package/package.json +45 -47
- package/src/components/Tiptapify.vue +27 -8
- package/src/components/Toolbar/Index.vue +113 -9
- package/src/components/Toolbar/Items.vue +11 -5
- package/src/components/Toolbar/items.ts +14 -2
- package/src/components/Toolbar/style.ts +1 -1
- package/src/components/editorExtensions.ts +1 -1
- package/src/components/index.ts +6 -5
- package/src/constants/defaults.ts +4 -0
- package/src/extensions/components/actions/redo/Button.vue +7 -0
- package/src/extensions/components/actions/undo/Button.vue +7 -0
- package/src/extensions/components/alignment/center/Button.vue +7 -0
- package/src/extensions/components/alignment/justify/Button.vue +7 -0
- package/src/extensions/components/alignment/left/Button.vue +7 -0
- package/src/extensions/components/alignment/right/Button.vue +7 -0
- package/src/extensions/components/format/bold/Button.vue +7 -0
- package/src/extensions/components/format/italic/Button.vue +7 -0
- package/src/extensions/components/format/strike/Button.vue +7 -0
- package/src/extensions/components/format/underline/Button.vue +7 -0
- package/src/extensions/components/formatExtra/code/Button.vue +7 -0
- package/src/extensions/components/formatExtra/codeBlock/Button.vue +7 -0
- package/src/extensions/components/formatExtra/quote/Button.vue +7 -0
- package/src/extensions/components/formatExtra/sub/Button.vue +7 -0
- package/src/extensions/components/formatExtra/sup/Button.vue +7 -0
- package/src/extensions/components/list/bullet/Button.vue +7 -0
- package/src/extensions/components/list/indent/Button.vue +7 -0
- package/src/extensions/components/list/numbered/Button.vue +7 -0
- package/src/extensions/components/list/outdent/Button.vue +7 -0
- package/src/extensions/components/list/task/Button.vue +7 -0
- package/src/extensions/components/media/emoji/Button.vue +8 -2
- package/src/extensions/components/media/image/Button.vue +7 -0
- package/src/extensions/components/media/image/ImageDialog.vue +3 -2
- package/src/extensions/components/media/link/Button.vue +7 -0
- package/src/extensions/components/media/link/LinkDialog.vue +2 -1
- package/src/extensions/components/media/table/Button.vue +7 -0
- package/src/extensions/components/media/video/Button.vue +7 -0
- package/src/extensions/components/media/video/VideoDialog.vue +3 -2
- package/src/extensions/components/misc/break/Button.vue +7 -1
- package/src/extensions/components/misc/formatClear/Button.vue +7 -0
- package/src/extensions/components/misc/invisibleChar/Button.vue +7 -0
- package/src/extensions/components/misc/line/Button.vue +7 -1
- package/src/extensions/components/misc/preview/Button.vue +7 -1
- package/src/extensions/components/misc/source/Button.vue +8 -2
- package/src/extensions/components/misc/source/ShowSourceDialog.vue +2 -1
- package/src/extensions/components/style/StyleColor.vue +4 -2
- package/src/extensions/components/style/color/Button.vue +4 -1
- package/src/extensions/components/style/fontFamily/Button.vue +7 -0
- package/src/extensions/components/style/fontSize/Button.vue +5 -1
- package/src/extensions/components/style/heading/Button.vue +14 -6
- package/src/extensions/components/style/highlight/Button.vue +4 -1
- package/src/extensions/components/style/lineHeight/Button.vue +7 -0
- package/src/types/{toolbarSections.ts → toolbarTypes.ts} +4 -1
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('italic') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleItalic().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleItalic()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('strike') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleStrike().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleStrike()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('underline') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleUnderline().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleUnderline()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('code') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleCode().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleCode()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('codeBlock') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleCodeBlock().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleCodeBlock()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('blockquote') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleBlockquote().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleBlockquote()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('sub') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleSubscript().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleSubscript()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('sup') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleSuperscript().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleSuperscript()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('bulletList') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleBulletList().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleBulletList()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:active="false"
|
|
17
23
|
:disabled="!editor.can().sinkListItem('listItem')"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.chain().focus().sinkListItem('listItem').run()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('orderedList') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleOrderedList().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleOrderedList()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:active="false"
|
|
17
23
|
:disabled="!editor.can().liftListItem('listItem')"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.chain().focus().liftListItem('listItem').run()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<VBtn
|
|
16
22
|
:color="editor.isActive('taskList') ? 'primary' : ''"
|
|
17
23
|
:disabled="!editor.can().chain().focus().toggleTaskList().run()"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleTaskList()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -6,6 +6,12 @@ import tiptapifyEmojis from "@tiptapify/extensions/emoji"
|
|
|
6
6
|
import { computed, inject, Ref, ref, watch } from 'vue'
|
|
7
7
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
8
8
|
|
|
9
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
|
|
11
|
+
defineProps({
|
|
12
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
16
|
|
|
11
17
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -64,6 +70,7 @@ watch(() => tab.value, () => {
|
|
|
64
70
|
<VBtn
|
|
65
71
|
:id="`tiptapify-emoji-button-${editor.instanceId}`"
|
|
66
72
|
:color="editor.isActive('image') ? 'primary' : ''"
|
|
73
|
+
:variant="variantBtn"
|
|
67
74
|
size="32"
|
|
68
75
|
>
|
|
69
76
|
<VTooltip activator="parent">
|
|
@@ -104,7 +111,7 @@ watch(() => tab.value, () => {
|
|
|
104
111
|
/>
|
|
105
112
|
<div class="tiptapify-emoji-container">
|
|
106
113
|
<VWindow v-model="tab" direction="vertical">
|
|
107
|
-
<VWindowItem v-for="item of emojisRef" :value="item.group">
|
|
114
|
+
<VWindowItem v-for="item of emojisRef" :value="item.group" :transition="false" :reverse-transition="false">
|
|
108
115
|
<div
|
|
109
116
|
v-for="emojiItem in item.emojis"
|
|
110
117
|
class="tiptapify-emoji-container-item"
|
|
@@ -155,7 +162,6 @@ watch(() => tab.value, () => {
|
|
|
155
162
|
cursor: pointer;
|
|
156
163
|
width: 32px;
|
|
157
164
|
height: 32px;
|
|
158
|
-
filter: drop-shadow(1px 2px 3px #777);
|
|
159
165
|
transition: background-color 0.2s ease-in-out;
|
|
160
166
|
}
|
|
161
167
|
|
|
@@ -6,6 +6,12 @@ import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
|
6
6
|
import ImageDialog from "@tiptapify/extensions/components/media/image/ImageDialog.vue";
|
|
7
7
|
import { inject, Ref } from "vue";
|
|
8
8
|
|
|
9
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
|
|
11
|
+
defineProps({
|
|
12
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
16
|
|
|
11
17
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
15
21
|
<template>
|
|
16
22
|
<VBtn
|
|
17
23
|
:color="editor.isActive('image') ? 'primary' : ''"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.showTiptapifyImage()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { Editor } from "@tiptap/vue-3";
|
|
4
4
|
import TiptapifyDialog from "@tiptapify/components/UI/TiptapifyDialog.vue";
|
|
5
|
+
import defaults from "@tiptapify/constants/defaults";
|
|
5
6
|
|
|
6
7
|
import { computed, inject, onMounted, onUnmounted, Ref, ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
defineProps({
|
|
9
|
-
variantBtn: { type: String, default() { return
|
|
10
|
-
variantField: { type: String, default() { return
|
|
10
|
+
variantBtn: { type: String, default() { return defaults.variantBtn }},
|
|
11
|
+
variantField: { type: String, default() { return defaults.variantField }}
|
|
11
12
|
})
|
|
12
13
|
|
|
13
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
@@ -6,6 +6,12 @@ import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
|
6
6
|
import LinkDialog from "@tiptapify/extensions/components/media/link/LinkDialog.vue";
|
|
7
7
|
import { computed, inject, Ref } from "vue";
|
|
8
8
|
|
|
9
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
|
|
11
|
+
defineProps({
|
|
12
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
16
|
|
|
11
17
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -17,6 +23,7 @@ const icon = computed(() => editor.value.isActive('tiptapifyLink') ? `mdiSvg:${m
|
|
|
17
23
|
<template>
|
|
18
24
|
<VBtn
|
|
19
25
|
:color="editor.isActive('link') ? 'primary' : ''"
|
|
26
|
+
:variant="variantBtn"
|
|
20
27
|
@click="editor.commands.showLink()"
|
|
21
28
|
size="32"
|
|
22
29
|
>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
|
|
3
3
|
import { Editor } from "@tiptap/vue-3";
|
|
4
|
+
import defaults from "@tiptapify/constants/defaults";
|
|
4
5
|
|
|
5
6
|
import { computed, inject, onMounted, onUnmounted, Ref, ref, watch } from 'vue'
|
|
6
7
|
|
|
7
8
|
import TiptapifyDialog from "@tiptapify/components/UI/TiptapifyDialog.vue"
|
|
8
9
|
|
|
9
10
|
defineProps({
|
|
10
|
-
variantBtn: { type: String, default() { return
|
|
11
|
+
variantBtn: { type: String, default() { return defaults.variantBtn }},
|
|
11
12
|
variantField: { type: String, default() { return 'outlined' }}
|
|
12
13
|
})
|
|
13
14
|
|
|
@@ -8,6 +8,12 @@ import RowActions from "@tiptapify/extensions/components/media/table/RowActions.
|
|
|
8
8
|
import TableBuilder from "@tiptapify/extensions/components/media/table/TableBuilder.vue";
|
|
9
9
|
import { inject, Ref } from "vue";
|
|
10
10
|
|
|
11
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
12
|
+
|
|
13
|
+
defineProps({
|
|
14
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
15
|
+
})
|
|
16
|
+
|
|
11
17
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
12
18
|
|
|
13
19
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -31,6 +37,7 @@ const columnActionsDisabled = () => {
|
|
|
31
37
|
:id="`tiptapify-table-button-${editor.instanceId}`"
|
|
32
38
|
:color="editor.isActive('table') ? 'primary' : ''"
|
|
33
39
|
:disabled="!editor.can().chain().focus().insertTable().run()"
|
|
40
|
+
:variant="variantBtn"
|
|
34
41
|
size="32"
|
|
35
42
|
>
|
|
36
43
|
<BtnIcon :icon="`mdiSvg:${mdi.mdiTable}`" />
|
|
@@ -5,6 +5,12 @@ import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
|
5
5
|
import VideoDialog from "@tiptapify/extensions/components/media/video/VideoDialog.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const icon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" vie
|
|
|
15
21
|
<template>
|
|
16
22
|
<VBtn
|
|
17
23
|
:color="editor.isActive('video') ? 'primary' : ''"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.showTiptapifyVideo()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { Editor } from "@tiptap/vue-3";
|
|
4
4
|
import TiptapifyDialog from "@tiptapify/components/UI/TiptapifyDialog.vue";
|
|
5
|
+
import defaults from "@tiptapify/constants/defaults";
|
|
5
6
|
|
|
6
7
|
import { computed, inject, onMounted, onUnmounted, Ref, ref } from 'vue'
|
|
7
8
|
|
|
8
9
|
defineProps({
|
|
9
|
-
variantBtn: { type: String, default() { return
|
|
10
|
-
variantField: { type: String, default() { return
|
|
10
|
+
variantBtn: { type: String, default() { return defaults.variantBtn }},
|
|
11
|
+
variantField: { type: String, default() { return defaults.variantField }}
|
|
11
12
|
})
|
|
12
13
|
|
|
13
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -12,7 +18,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
12
18
|
</script>
|
|
13
19
|
|
|
14
20
|
<template>
|
|
15
|
-
<VBtn @click="editor.chain().focus().setHardBreak().run()" size="32">
|
|
21
|
+
<VBtn @click="editor.chain().focus().setHardBreak().run()" size="32" :variant="variantBtn">
|
|
16
22
|
<VTooltip activator="parent">
|
|
17
23
|
{{ t('format.break') }}
|
|
18
24
|
</VTooltip>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -14,6 +20,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
14
20
|
<template>
|
|
15
21
|
<VBtn
|
|
16
22
|
:disabled="!editor.can().chain().focus().unsetAllMarks().run()"
|
|
23
|
+
:variant="variantBtn"
|
|
17
24
|
@click="editor.chain().focus().unsetAllMarks().clearNodes().run()"
|
|
18
25
|
size="32"
|
|
19
26
|
>
|
|
@@ -4,6 +4,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
4
4
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
5
5
|
import { inject, Ref } from "vue";
|
|
6
6
|
|
|
7
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
8
|
+
|
|
9
|
+
defineProps({
|
|
10
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
11
|
+
})
|
|
12
|
+
|
|
7
13
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
8
14
|
|
|
9
15
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,6 +21,7 @@ const icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><pat
|
|
|
15
21
|
<template>
|
|
16
22
|
<VBtn
|
|
17
23
|
:color="editor.storage.invisibleCharacters.visibility() ? 'primary' : ''"
|
|
24
|
+
:variant="variantBtn"
|
|
18
25
|
@click="editor.commands.toggleInvisibleCharacters()"
|
|
19
26
|
size="32"
|
|
20
27
|
>
|
|
@@ -5,6 +5,12 @@ import { Editor } from "@tiptap/vue-3";
|
|
|
5
5
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
6
6
|
import { inject, Ref } from "vue";
|
|
7
7
|
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
13
|
+
|
|
8
14
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
9
15
|
|
|
10
16
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -12,7 +18,7 @@ const { t } = inject('tiptapifyI18n') as any
|
|
|
12
18
|
</script>
|
|
13
19
|
|
|
14
20
|
<template>
|
|
15
|
-
<VBtn @click="editor.chain().focus().setHorizontalRule().run()" size="32">
|
|
21
|
+
<VBtn @click="editor.chain().focus().setHorizontalRule().run()" size="32" :variant="variantBtn">
|
|
16
22
|
<VTooltip activator="parent">
|
|
17
23
|
{{ t('format.line') }}
|
|
18
24
|
</VTooltip>
|
|
@@ -6,6 +6,12 @@ import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
|
6
6
|
import TiptapifyDialog from "@tiptapify/components/UI/TiptapifyDialog.vue";
|
|
7
7
|
import { inject, ref, Ref } from "vue";
|
|
8
8
|
|
|
9
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
10
|
+
|
|
11
|
+
defineProps({
|
|
12
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
13
|
+
})
|
|
14
|
+
|
|
9
15
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
10
16
|
|
|
11
17
|
const { t } = inject('tiptapifyI18n') as any
|
|
@@ -15,7 +21,7 @@ const dialog = ref(null)
|
|
|
15
21
|
</script>
|
|
16
22
|
|
|
17
23
|
<template>
|
|
18
|
-
<VBtn @click="dialog.open()" size="32">
|
|
24
|
+
<VBtn @click="dialog.open()" size="32" :variant="variantBtn">
|
|
19
25
|
<VTooltip activator="parent">
|
|
20
26
|
{{ t('misc.preview') }}
|
|
21
27
|
</VTooltip>
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
import * as mdi from '@mdi/js'
|
|
4
4
|
import BtnIcon from "@tiptapify/components/UI/BtnIcon.vue";
|
|
5
5
|
import ShowSourceDialog from "@tiptapify/extensions/components/misc/source/ShowSourceDialog.vue";
|
|
6
|
-
import { inject, ref
|
|
6
|
+
import { inject, ref } from "vue";
|
|
7
|
+
|
|
8
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
9
|
+
|
|
10
|
+
defineProps({
|
|
11
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
|
+
})
|
|
7
13
|
|
|
8
14
|
const { t } = inject('tiptapifyI18n') as any
|
|
9
15
|
|
|
@@ -16,7 +22,7 @@ function showDialog() {
|
|
|
16
22
|
</script>
|
|
17
23
|
|
|
18
24
|
<template>
|
|
19
|
-
<VBtn @click="showDialog()" size="32">
|
|
25
|
+
<VBtn @click="showDialog()" size="32" :variant="variantBtn">
|
|
20
26
|
<VTooltip activator="parent">
|
|
21
27
|
{{ t('misc.source') }}
|
|
22
28
|
</VTooltip>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { Editor } from "@tiptap/vue-3";
|
|
3
3
|
import TiptapifyDialog from "@tiptapify/components/UI/TiptapifyDialog.vue";
|
|
4
|
+
import defaults from "@tiptapify/constants/defaults";
|
|
4
5
|
import { ref, watch, inject, Ref } from 'vue'
|
|
5
6
|
|
|
6
7
|
const props = defineProps({
|
|
7
8
|
indent: { type: Number, default: 2 },
|
|
8
9
|
variantBtn: { type: String, default: 'elevated' },
|
|
9
|
-
variantField: { type: String, default:
|
|
10
|
+
variantField: { type: String, default: defaults.variantField }
|
|
10
11
|
})
|
|
11
12
|
|
|
12
13
|
defineExpose({ showDialog })
|
|
@@ -93,11 +93,13 @@ function hexToRgb(hex: string): Color {
|
|
|
93
93
|
function hoverColor(color: string) {
|
|
94
94
|
colorSelected.value = false
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
const interactiveStyles = editor.value.interactiveStyles
|
|
97
|
+
|
|
98
|
+
if (props.fontColor && interactiveStyles) {
|
|
97
99
|
editor.value.chain().focus().setColor(color).run()
|
|
98
100
|
}
|
|
99
101
|
|
|
100
|
-
if (props.backgroundColor) {
|
|
102
|
+
if (props.backgroundColor && interactiveStyles) {
|
|
101
103
|
editor.value.chain().focus().setHighlight({ color: color }).run()
|
|
102
104
|
}
|
|
103
105
|
}
|
|
@@ -7,8 +7,10 @@ import StyleColor from "@tiptapify/extensions/components/style/StyleColor.vue";
|
|
|
7
7
|
import { computed, inject, Ref } from "vue";
|
|
8
8
|
import { useTheme } from "vuetify/framework";
|
|
9
9
|
|
|
10
|
+
import defaults from '@tiptapify/constants/defaults'
|
|
11
|
+
|
|
10
12
|
defineProps({
|
|
11
|
-
|
|
13
|
+
variantBtn: { type: String, default: defaults.variantBtn }
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
const editor = inject('tiptapifyEditor') as Ref<Editor>
|
|
@@ -30,6 +32,7 @@ const selectedColor = computed(() => editor.value.getAttributes('textStyle').col
|
|
|
30
32
|
<VBtn
|
|
31
33
|
:id="`tiptapify-color-button-${editor.instanceId}`"
|
|
32
34
|
:disabled="!editor.can().chain().focus().toggleHighlight().run()"
|
|
35
|
+
:variant="variantBtn"
|
|
33
36
|
@click="editor.chain().focus().redo().run()"
|
|
34
37
|
size="32"
|
|
35
38
|
>
|