feat: render custom server emojis on editor (#579)
This commit is contained in:
parent
847e64ef6d
commit
4d21d27f94
7 changed files with 144 additions and 9 deletions
|
@ -14,6 +14,7 @@ import { Plugin } from 'prosemirror-state'
|
|||
import type { Ref } from 'vue'
|
||||
import { HashSuggestion, MentionSuggestion } from './tiptap/suggestion'
|
||||
import { CodeBlockShiki } from './tiptap/shiki'
|
||||
import { Emoji } from './tiptap/emoji'
|
||||
|
||||
export interface UseTiptapOptions {
|
||||
content: Ref<string | undefined>
|
||||
|
@ -41,6 +42,13 @@ export function useTiptap(options: UseTiptapOptions) {
|
|||
Italic,
|
||||
Code,
|
||||
Text,
|
||||
Emoji,
|
||||
Emoji.configure({
|
||||
inline: true,
|
||||
HTMLAttributes: {
|
||||
class: 'custom-emoji',
|
||||
},
|
||||
}),
|
||||
Mention.configure({
|
||||
suggestion: MentionSuggestion,
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue