fix: emoji fix

This commit is contained in:
tim
2025-08-06 19:26:35 +08:00
parent 6a1b71de0f
commit 05dbeccdd7
4 changed files with 16 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ import 'vditor/dist/index.css'
import { API_BASE_URL } from '../main'
import { getToken, authState } from './auth'
import { searchUsers, fetchFollowings, fetchAdmins } from './user'
import { tiebaEmoji, TIEBA_EMOJI_CDN } from './tiebaEmoji'
import { tiebaEmoji } from './tiebaEmoji'
export function getEditorTheme() {
return document.documentElement.dataset.theme === 'dark' ? 'dark' : 'classic'
@@ -45,12 +45,9 @@ export function createVditor(editorId, options = {}) {
theme: getEditorTheme(),
preview: Object.assign({
theme: { current: getPreviewTheme() },
customEmoji: tiebaEmoji,
emojiPath: TIEBA_EMOJI_CDN
}, preview),
hint: {
emoji: tiebaEmoji,
emojiPath: TIEBA_EMOJI_CDN,
extend: [
{
key: '@',