mirror of
https://github.com/cloudreve/frontend.git
synced 2025-12-25 19:52:48 +00:00
fix: add fallback codeblock editor in mdxeditor (https://github.com/cloudreve/Cloudreve/issues/2387)
This commit is contained in:
parent
96f168cbc5
commit
e8c83a42f4
|
|
@ -5,6 +5,7 @@ import {
|
|||
ChangeAdmonitionType,
|
||||
ChangeCodeMirrorLanguage,
|
||||
codeBlockPlugin,
|
||||
CodeMirrorEditor,
|
||||
codeMirrorPlugin,
|
||||
CodeToggle,
|
||||
ConditionalContents,
|
||||
|
|
@ -184,7 +185,10 @@ const MarkdownEditor = (props: MarkdownEditorProps) => {
|
|||
tablePlugin(),
|
||||
thematicBreakPlugin(),
|
||||
frontmatterPlugin(),
|
||||
codeBlockPlugin({ defaultCodeBlockLanguage: "" }),
|
||||
codeBlockPlugin({
|
||||
defaultCodeBlockLanguage: "",
|
||||
codeBlockEditorDescriptors: [{ priority: -10, match: (_) => true, Editor: CodeMirrorEditor }],
|
||||
}),
|
||||
codeMirrorPlugin({
|
||||
codeBlockLanguages: {
|
||||
js: "JavaScript",
|
||||
|
|
|
|||
Loading…
Reference in New Issue