mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Add Markdown visual editor support
GitOrigin-RevId: 4ec2ffb276c729a58f82ccb26ed571f4187a4178
This commit is contained in:
committed by
Copybot
parent
e38f4e18e4
commit
5cf1b43ce7
@@ -63,7 +63,7 @@ import { useActiveOverallTheme } from '@/shared/hooks/use-active-overall-theme'
|
||||
import { useEditorSelectionContext } from '@/shared/context/editor-selection-context'
|
||||
import { useActiveEditorTheme } from '@/shared/hooks/use-active-editor-theme'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
import { isValidTeXFile } from '@/main/is-valid-tex-file'
|
||||
import { isCmVisualEditorAvailable } from '../utils/visual-editor'
|
||||
|
||||
function useCodeMirrorScope(view: EditorView) {
|
||||
const { fileTreeData } = useFileTreeData()
|
||||
@@ -277,7 +277,8 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
|
||||
const { previewByPath } = useFileTreePathContext()
|
||||
|
||||
const showVisual = visual && !!openDocName && isValidTeXFile(openDocName)
|
||||
const showVisual =
|
||||
visual && !!openDocName && isCmVisualEditorAvailable(openDocName)
|
||||
|
||||
const visualRef = useRef({
|
||||
previewByPath,
|
||||
|
||||
Reference in New Issue
Block a user