How do I go about disabling the HTML syntax highlighter when using lang-markdown
extension?
In my editor, I want to enable Liquid and Commonmark, but disable HTML syntax highlighting (as we’re disabling that for our implementation).
This is what my current configuration looks like:
export const editorSetup = ((settings) => {
const options = deepMerge({
liquid: {
base: markdown({
base: commonmarkLanguage
, completeHTMLTags: false
})
}
, autocompletion: {}
}, settings);
return [
lineNumbers(),
highlightActiveLineGutter(),
highlightSpecialChars(),
history(),
foldGutter(),
drawSelection(),
dropCursor(),
EditorState.allowMultipleSelections.of(true),
indentOnInput(),
syntaxHighlighting(defaultHighlightStyle, {fallback: true}),
bracketMatching(),
closeBrackets(),
autocompletion(options.autocompletion),
rectangularSelection(),
crosshairCursor(),
highlightActiveLine(),
highlightSelectionMatches(),
keymap.of([
...closeBracketsKeymap,
...defaultKeymap,
...searchKeymap,
...historyKeymap,
...foldKeymap,
...completionKeymap,
...lintKeymap,
// allow the tab to accept autocompletion
{ key: "Tab", run: acceptCompletion },
indentWithTab
]),
liquid(options.liquid),
// set the indentation behavior
indentUnit.of("\t"),
EditorState.tabSize.of(2),
]
});
I think I need to override the htmlTagLanguage
in the markdown()
call, but not sure how to effectively “disable” the setting.