How to support code blocks without syntax highlighting? #196
-
If I just add: codeBlockPlugin({
defaultCodeBlockLanguage: 'js',
}) I get:
If I don't add plugin at all, I get:
I just want simple code block without highlighting. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I've worked out a way to achieve this within the react framework, though it is not particularly pretty, it is based on the code in the code blocks sections:
You can then use this descriptor directly with the codeBlockPlugin:
|
Beta Was this translation helpful? Give feedback.
-
If you are using the codeMirrorPlugin, you could try adding an empty string to the languages. codeBlockPlugin(),
codeMirrorPlugin({
codeBlockLanguages: {
js: "JavaScript",
txt: "text",
"": "text",
},
}), |
Beta Was this translation helpful? Give feedback.
-
Getting an error after adding an empty key. |
Beta Was this translation helpful? Give feedback.
If you are using the codeMirrorPlugin, you could try adding an empty string to the languages.
This fixed the same error for me