fix(tiptap-editor): configure link via StarterKit to avoid duplicate extension warning
This commit is contained in:
parent
f6db477a88
commit
078e9b1da1
@ -3,7 +3,6 @@ import StarterKit from '@tiptap/starter-kit'
|
|||||||
import { Markdown } from '@tiptap/markdown'
|
import { Markdown } from '@tiptap/markdown'
|
||||||
import { TableKit } from '@tiptap/extension-table'
|
import { TableKit } from '@tiptap/extension-table'
|
||||||
import { Image } from '@tiptap/extension-image'
|
import { Image } from '@tiptap/extension-image'
|
||||||
import { Link } from '@tiptap/extension-link'
|
|
||||||
import { TaskList, TaskItem } from '@tiptap/extension-list'
|
import { TaskList, TaskItem } from '@tiptap/extension-list'
|
||||||
import { FileHandler } from '@tiptap/extension-file-handler'
|
import { FileHandler } from '@tiptap/extension-file-handler'
|
||||||
import { SlashCommand } from './slash-command'
|
import { SlashCommand } from './slash-command'
|
||||||
@ -43,18 +42,18 @@ class TiptapEditorInstance {
|
|||||||
heading: {
|
heading: {
|
||||||
levels: [1, 2, 3],
|
levels: [1, 2, 3],
|
||||||
},
|
},
|
||||||
|
link: {
|
||||||
|
openOnClick: false,
|
||||||
|
autolink: true,
|
||||||
|
linkOnPaste: true,
|
||||||
|
HTMLAttributes: { rel: 'noopener noreferrer', target: '_blank' },
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
Markdown.configure({
|
Markdown.configure({
|
||||||
html: false,
|
html: false,
|
||||||
}),
|
}),
|
||||||
TableKit,
|
TableKit,
|
||||||
Image.configure({ allowBase64: true }),
|
Image.configure({ allowBase64: true }),
|
||||||
Link.configure({
|
|
||||||
openOnClick: false,
|
|
||||||
autolink: true,
|
|
||||||
linkOnPaste: true,
|
|
||||||
HTMLAttributes: { rel: 'noopener noreferrer', target: '_blank' },
|
|
||||||
}),
|
|
||||||
TaskList,
|
TaskList,
|
||||||
TaskItem.configure({ nested: true }),
|
TaskItem.configure({ nested: true }),
|
||||||
SlashCommand,
|
SlashCommand,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user