feat: custom emoji font in editor

This commit is contained in:
Anthony Fu 2022-12-27 20:13:50 +01:00
parent e97068f000
commit 8f68fa12e4
7 changed files with 153 additions and 86 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 { CustomEmoji } from './tiptap/custom-emoji'
import { Emoji } from './tiptap/emoji'
export interface UseTiptapOptions {
@ -43,7 +44,7 @@ export function useTiptap(options: UseTiptapOptions) {
Code,
Text,
Emoji,
Emoji.configure({
CustomEmoji.configure({
inline: true,
HTMLAttributes: {
class: 'custom-emoji',