feat(publish): add hashtag autocomplete (#778)
This commit is contained in:
parent
9d7b7b66ed
commit
1ff584bf8b
4 changed files with 94 additions and 20 deletions
|
@ -12,7 +12,7 @@ import Code from '@tiptap/extension-code'
|
|||
import { Plugin } from 'prosemirror-state'
|
||||
|
||||
import type { Ref } from 'vue'
|
||||
import { HashSuggestion, MentionSuggestion } from './tiptap/suggestion'
|
||||
import { HashtagSuggestion, MentionSuggestion } from './tiptap/suggestion'
|
||||
import { CodeBlockShiki } from './tiptap/shiki'
|
||||
import { CustomEmoji } from './tiptap/custom-emoji'
|
||||
import { Emoji } from './tiptap/emoji'
|
||||
|
@ -54,9 +54,9 @@ export function useTiptap(options: UseTiptapOptions) {
|
|||
suggestion: MentionSuggestion,
|
||||
}),
|
||||
Mention
|
||||
.extend({ name: 'hastag' })
|
||||
.extend({ name: 'hashtag' })
|
||||
.configure({
|
||||
suggestion: HashSuggestion,
|
||||
suggestion: HashtagSuggestion,
|
||||
}),
|
||||
Placeholder.configure({
|
||||
placeholder: placeholder.value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue