fix: revert vditor change

This commit is contained in:
tim
2025-08-15 00:50:44 +08:00
parent 2cf89e4802
commit 6f3830b3f7

View File

@@ -2,7 +2,6 @@ import Vditor from 'vditor'
import { getToken, authState } from './auth'
import { searchUsers, fetchFollowings, fetchAdmins } from './user'
import { tiebaEmoji } from './tiebaEmoji'
import { useIsMobile } from './screen'
export function getEditorTheme() {
return document.documentElement.dataset.theme === 'dark' ? 'dark' : 'classic'
@@ -34,8 +33,7 @@ export function createVditor(editorId, options = {}) {
return searchUsers(value)
}
const isMobile = useIsMobile()
const isMobile = window.innerWidth <= 768
const toolbar = isMobile
? ['emoji', 'upload']
: [
@@ -166,7 +164,7 @@ export function createVditor(editorId, options = {}) {
// }
// }
// },
toolbarConfig: { pin: isMobile ? false : true },
toolbarConfig: { pin: true },
cache: { enable: false },
input,
after,