diff --git a/src/editor/language-detection/autodetect.js b/src/editor/language-detection/autodetect.js index 2ba35a6..8758028 100644 --- a/src/editor/language-detection/autodetect.js +++ b/src/editor/language-detection/autodetect.js @@ -78,7 +78,9 @@ export function languageDetection(getView) { // if content is cleared, set language to plaintext const view = getView() const block = getActiveNoteBlock(view.state) - changeLanguageTo(view.state, view.dispatch, block, "text", true) + if (block.language.name !== "text") { + changeLanguageTo(view.state, view.dispatch, block, "text", true) + } } if (content.length <= 8) { return