We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d92b27e commit 65aca04Copy full SHA for 65aca04
1 file changed
src/editors/sharedComponents/CodeEditor/hooks.js
@@ -100,7 +100,7 @@ export const createCodeMirrorDomNode = ({
100
}) => {
101
// eslint-disable-next-line react-hooks/rules-of-hooks
102
useEffect(() => {
103
- const languageExtension = CODEMIRROR_LANGUAGES[lang]();
+ const languageExtension = CODEMIRROR_LANGUAGES[lang] ? CODEMIRROR_LANGUAGES[lang]() : xml();
104
const cleanText = cleanHTML({ initialText });
105
const newState = EditorState.create({
106
doc: cleanText,
0 commit comments