feat: render custom server emojis on editor (#579)

This commit is contained in:
Joaquín Sánchez 2022-12-27 19:38:57 +01:00 committed by GitHub
parent 847e64ef6d
commit 4d21d27f94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 144 additions and 9 deletions

View file

@ -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,
}),