sprintify-ui 0.10.79 → 0.10.82

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.
@@ -4,11 +4,9 @@ type __VLS_Props = {
4
4
  modelValue: string | null | undefined;
5
5
  editor?: 'classic' | 'inline' | 'balloon';
6
6
  size?: Size;
7
- toolbar?: ToolbarOption[];
7
+ toolbar?: ToolbarOption[] | string[];
8
8
  placeholder?: string;
9
9
  disabled?: boolean;
10
- required?: boolean;
11
- name?: string;
12
10
  };
13
11
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
14
12
  getEditorData(): string;
@@ -26,11 +24,9 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
26
24
  onReady?: ((...args: any[]) => any) | undefined;
27
25
  }>, {
28
26
  size: Size;
29
- required: boolean;
30
27
  disabled: boolean;
31
- name: string;
32
28
  placeholder: string;
33
- toolbar: ToolbarOption[];
29
+ toolbar: ToolbarOption[] | string[];
34
30
  editor: "classic" | "inline" | "balloon";
35
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
32
  export default _default;
@@ -71,7 +71,7 @@ declare const rowsInternal: import("vue").Ref<{
71
71
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
72
72
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
73
73
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
74
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
74
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
75
75
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
76
76
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
77
77
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -154,7 +154,7 @@ declare const rowsInternal: import("vue").Ref<{
154
154
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
155
155
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
156
156
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
157
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
157
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
158
158
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
159
159
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
160
160
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -252,7 +252,7 @@ declare const rowsInternal: import("vue").Ref<{
252
252
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
253
253
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
254
254
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
255
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
255
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
256
256
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
257
257
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
258
258
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -335,7 +335,7 @@ declare const rowsInternal: import("vue").Ref<{
335
335
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
336
336
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
337
337
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
338
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
338
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
339
339
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
340
340
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
341
341
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -429,7 +429,7 @@ declare const groups: import("vue").Ref<{
429
429
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
430
430
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
431
431
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
432
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
432
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
433
433
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
434
434
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
435
435
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -518,7 +518,7 @@ declare const groups: import("vue").Ref<{
518
518
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
519
519
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
520
520
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
521
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
521
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
522
522
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
523
523
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
524
524
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -608,7 +608,7 @@ declare const ticks: import("vue").Ref<{
608
608
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
609
609
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
610
610
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
611
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
611
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
612
612
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
613
613
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
614
614
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -697,7 +697,7 @@ declare const ticks: import("vue").Ref<{
697
697
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
698
698
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
699
699
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
700
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
700
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
701
701
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
702
702
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
703
703
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -802,7 +802,7 @@ declare var __VLS_1: {
802
802
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
803
803
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
804
804
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
805
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
805
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
806
806
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
807
807
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
808
808
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -885,7 +885,7 @@ declare var __VLS_1: {
885
885
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
886
886
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
887
887
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
888
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
888
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
889
889
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
890
890
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
891
891
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -981,7 +981,7 @@ declare var __VLS_1: {
981
981
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
982
982
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
983
983
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
984
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
984
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
985
985
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
986
986
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
987
987
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -1064,7 +1064,7 @@ declare var __VLS_1: {
1064
1064
  minus: (duration: import("luxon").DurationLike) => import("luxon").DateTime<boolean>;
1065
1065
  startOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").StartOfOptions) => import("luxon").DateTime<boolean>;
1066
1066
  endOf: (unit: import("luxon").DateTimeUnit, opts?: import("luxon").EndOfOptions) => import("luxon").DateTime<boolean>;
1067
- toFormat: (fmt: string, opts?: import("luxon").LocaleOptions) => string;
1067
+ toFormat: (format: string, options?: import("luxon").LocaleOptions) => string;
1068
1068
  toLocaleString: (formatOpts?: import("luxon").DateTimeFormatOptions, opts?: import("luxon").LocaleOptions) => string;
1069
1069
  toLocaleParts: (opts?: import("luxon").DateTimeFormatOptions) => Intl.DateTimeFormatPart[];
1070
1070
  toISO: (opts?: import("luxon").ToISOTimeOptions) => string | null;
@@ -2,9 +2,14 @@ import { Size } from '@/utils/sizes';
2
2
  import { ToolbarOption } from '@/types/ToolbarOption';
3
3
  type __VLS_Props = {
4
4
  modelValue: string | null | undefined;
5
+ driver?: 'ckeditor' | 'tiptap';
6
+ /**
7
+ * Defines the CKEditor layout style.
8
+ * Only applicable when `driver` is 'ckeditor'.
9
+ */
5
10
  editor?: 'classic' | 'inline' | 'balloon';
6
11
  size?: Size;
7
- toolbar?: ToolbarOption[];
12
+ toolbar?: ToolbarOption[] | string[];
8
13
  placeholder?: string;
9
14
  disabled?: boolean;
10
15
  required?: boolean;
@@ -28,7 +33,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
28
33
  name: string;
29
34
  placeholder: string;
30
35
  hasError: boolean;
31
- toolbar: ToolbarOption[];
36
+ toolbar: ToolbarOption[] | string[];
32
37
  editor: "classic" | "inline" | "balloon";
38
+ driver: "ckeditor" | "tiptap";
33
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
40
  export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ modelValue: string | null | undefined;
3
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ hasError?: boolean;
5
+ disabled?: boolean;
6
+ placeholder?: string;
7
+ toolbar?: string[];
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (...args: any[]) => void;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.79",
3
+ "version": "0.10.82",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -21,7 +21,7 @@
21
21
  "@tailwindcss/typography": "^0.5.8",
22
22
  "@vueuse/core": "^10.0.0",
23
23
  "axios": "^0.26.1",
24
- "ckeditor5": "^44.1.0",
24
+ "ckeditor5": "^47.3.0",
25
25
  "croppie": "^2.6.5",
26
26
  "flatpickr": "^4.6.13",
27
27
  "humanize-duration": "^3.0.0",
@@ -43,8 +43,8 @@
43
43
  "tailwind-merge": "^2.4.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@ckeditor/ckeditor5-vue": "^7.3.0",
47
46
  "@babel/core": "^7.24.0",
47
+ "@ckeditor/ckeditor5-vue": "^7.3.0",
48
48
  "@commitlint/cli": "^17.8.1",
49
49
  "@commitlint/config-conventional": "^17.8.1",
50
50
  "@iconify/vue": "^4.1.1",
@@ -57,6 +57,9 @@
57
57
  "@tailwindcss/aspect-ratio": "^0.4.2",
58
58
  "@tailwindcss/forms": "^0.5.7",
59
59
  "@tailwindcss/typography": "^0.5.10",
60
+ "@tiptap/pm": "^3.13.0",
61
+ "@tiptap/starter-kit": "^3.13.0",
62
+ "@tiptap/vue-3": "^3.13.0",
60
63
  "@types/croppie": "^2.6.4",
61
64
  "@types/google.maps": "^3.55.4",
62
65
  "@types/humanize-duration": "^3.27.4",
@@ -74,6 +77,7 @@
74
77
  "autoprefixer": "^10.4.18",
75
78
  "axios": "^0.26.1",
76
79
  "babel-loader": "^8.3.0",
80
+ "ckeditor5": "^47.3.0",
77
81
  "croppie": "^2.6.5",
78
82
  "cz-conventional-changelog": "^3.3.0",
79
83
  "eslint": "^8.57.0",
@@ -89,7 +93,6 @@
89
93
  "maska": "^3.0.4",
90
94
  "object-hash": "^3.0.0",
91
95
  "object-to-formdata": "^4.5.1",
92
- "ckeditor5": "^44.1.0",
93
96
  "pinia": "^2.1.7",
94
97
  "postcss": "^8.4.36",
95
98
  "postcss-import": "^15.1.0",
@@ -102,6 +105,7 @@
102
105
  "standard-version": "^9.5.0",
103
106
  "storybook": "^8.3.0",
104
107
  "tailwindcss": "^3.4.1",
108
+ "tiptap-footnotes": "^3.0.1",
105
109
  "typescript": "^5.6.3",
106
110
  "unplugin-auto-import": "^0.12.2",
107
111
  "vite": "^5.4.5",
@@ -268,4 +268,35 @@ body {
268
268
  }
269
269
  }
270
270
  }
271
- }
271
+ }
272
+
273
+ /** TipTap */
274
+
275
+ body .tiptap {
276
+
277
+ ol.footnotes {
278
+ margin-top: 20px;
279
+ padding: 20px 0;
280
+ list-style-type: decimal;
281
+ padding-left: 13px;
282
+ font-size: 0.8em;
283
+ }
284
+
285
+ ol.footnotes:has(li) {
286
+ @apply border-t border-slate-300;
287
+ }
288
+
289
+ ol.footnotes li p {
290
+ margin: 0px;
291
+ line-height: 0.9em;
292
+ @apply text-slate-500;
293
+ }
294
+
295
+ p.is-editor-empty:first-child::before {
296
+ @apply text-slate-400;
297
+ content: attr(data-placeholder);
298
+ float: left;
299
+ height: 0;
300
+ pointer-events: none;
301
+ }
302
+ }
@@ -4,7 +4,6 @@
4
4
  :editor="editorInternal"
5
5
  :config="config"
6
6
  :disabled="disabled"
7
- :name="name"
8
7
  @update:model-value="emit('update:modelValue', $event)"
9
8
  @focus="emit('focus', $event)"
10
9
  @blur="emit('blur', $event)"
@@ -16,7 +15,6 @@
16
15
  <script lang="ts" setup>
17
16
  import { ClassicEditor, InlineEditor, BalloonEditor, Essentials, SourceEditing, MediaEmbed, Paragraph, Bold, Italic, List, Link, Autoformat, Heading, Underline, Code, CodeBlock, Table, TableToolbar, Image, ImageResize, ImageStyle, ImageToolbar, ImageInsert, AutoImage, Base64UploadAdapter, PasteFromOffice, BlockToolbar, Font, FindAndReplace, RemoveFormat } from 'ckeditor5';
18
17
  import { Ckeditor } from '@ckeditor/ckeditor5-vue';
19
-
20
18
  import { Size } from '@/utils/sizes';
21
19
  import { ToolbarOption } from '@/types/ToolbarOption';
22
20
 
@@ -24,21 +22,37 @@ const props = withDefaults(defineProps<{
24
22
  modelValue: string | null | undefined;
25
23
  editor?: 'classic' | 'inline' | 'balloon';
26
24
  size?: Size;
27
- toolbar?: ToolbarOption[];
25
+ toolbar?: ToolbarOption[] | string[];
28
26
  placeholder?: string;
29
27
  disabled?: boolean;
30
- required?: boolean;
31
- name?: string;
32
28
  }>(), {
33
29
  editor: 'classic',
34
30
  size: 'md',
35
31
  toolbar() {
36
- return ['undo', 'redo', '|', 'sourceEditing', 'heading', 'bold', 'italic', 'underline', '|', 'link', 'insertImage', '|', 'numberedList', 'bulletedList', '|', 'code', 'codeblock', '|', 'insertTable'] as ToolbarOption[];
32
+ return [
33
+ 'undo',
34
+ 'redo',
35
+ '|',
36
+ 'sourceEditing',
37
+ 'heading',
38
+ 'bold',
39
+ 'italic',
40
+ 'underline',
41
+ '|',
42
+ 'link',
43
+ 'insertImage',
44
+ '|',
45
+ 'numberedList',
46
+ 'bulletedList',
47
+ '|',
48
+ 'code',
49
+ 'codeblock',
50
+ '|',
51
+ 'insertTable'
52
+ ] as ToolbarOption[];
37
53
  },
38
54
  placeholder: '',
39
55
  disabled: false,
40
- required: false,
41
- name: '',
42
56
  hasError: false,
43
57
  });
44
58
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  class="md:grid md:grid-cols-3 md:gap-8"
4
- :class="[bordered ? 'mb-8 border-b border-slate-300' : '']"
4
+ :class="[bordered ? 'mb-8 pb-8 border-b border-slate-300' : '']"
5
5
  >
6
6
  <div class="md:col-span-1">
7
7
  <h3 class="text-base font-semibold leading-6 text-slate-900">
@@ -19,6 +19,10 @@ export default {
19
19
  placeholder: "This is a custom placeholder...",
20
20
  },
21
21
  argTypes: {
22
+ driver: {
23
+ control: { type: "select" },
24
+ options: ["ckeditor", "tiptap"],
25
+ },
22
26
  editor: {
23
27
  control: { type: "select" },
24
28
  options: ["classic", "inline", "balloon"],
@@ -42,6 +46,11 @@ const Template = (args) => ({
42
46
  `,
43
47
  });
44
48
 
49
+ export const TipTapEditor = Template.bind({});
50
+ TipTapEditor.args = {
51
+ driver: "tiptap",
52
+ };
53
+
45
54
  export const ClassicEditor = Template.bind({});
46
55
  ClassicEditor.args = {
47
56
  editor: "classic",
@@ -1,5 +1,17 @@
1
1
  <template>
2
+ <div v-if="driver == 'tiptap'">
3
+ <BaseTipTap
4
+ :model-value="modelValue"
5
+ :size="sizeInternal"
6
+ :disabled="disabled"
7
+ :has-error="hasErrorInternal"
8
+ :placeholder="placeholder"
9
+ :toolbar="toolbar"
10
+ @update:model-value="emitUpdate"
11
+ />
12
+ </div>
2
13
  <div
14
+ v-else
3
15
  class="base-rich-text relative"
4
16
  :class="[
5
17
  hasErrorInternal ? 'error' : '',
@@ -18,8 +30,6 @@
18
30
  :toolbar="toolbar"
19
31
  :placeholder="placeholder"
20
32
  :disabled="disabled"
21
- :required="requiredInternal"
22
- :name="nameInternal"
23
33
  @update:model-value="emitUpdate"
24
34
  @focus="emit('focus', $event)"
25
35
  @blur="emit('blur', $event)"
@@ -32,25 +42,30 @@
32
42
  import { useField } from '@/composables/field';
33
43
  import { Size } from '@/utils/sizes';
34
44
  import { ToolbarOption } from '@/types/ToolbarOption';
45
+ import BaseTipTap from './BaseTipTap.vue';
35
46
 
36
47
  const BaseCkeditor = defineAsyncComponent(() => import('./BaseCkeditor.vue'));
37
48
 
38
49
  const props = withDefaults(defineProps<{
39
50
  modelValue: string | null | undefined;
51
+ driver?: 'ckeditor' | 'tiptap';
52
+ /**
53
+ * Defines the CKEditor layout style.
54
+ * Only applicable when `driver` is 'ckeditor'.
55
+ */
40
56
  editor?: 'classic' | 'inline' | 'balloon';
41
57
  size?: Size;
42
- toolbar?: ToolbarOption[];
58
+ toolbar?: ToolbarOption[] | string[];
43
59
  placeholder?: string;
44
60
  disabled?: boolean;
45
61
  required?: boolean;
46
62
  name?: string;
47
63
  hasError?: boolean;
48
64
  }>(), {
65
+ driver: 'ckeditor',
49
66
  editor: 'classic',
50
67
  size: 'md',
51
- toolbar() {
52
- return ['undo', 'redo', '|', 'heading', 'bold', 'italic', 'underline', '|', 'link', 'insertImage', '|', 'numberedList', 'bulletedList', '|', 'code', 'codeblock', '|', 'insertTable'] as ToolbarOption[];
53
- },
68
+ toolbar: undefined,
54
69
  placeholder: '',
55
70
  disabled: false,
56
71
  required: false,