diff --git a/plugins/codemirror/source.html b/plugins/codemirror/source.html
index bc68b72..3a8d2d9 100644
--- a/plugins/codemirror/source.html
+++ b/plugins/codemirror/source.html
@@ -243,7 +243,7 @@
}
// Cleanup
- editor.bodyElement.querySelectorAll("#CmCaReT, .CmCaReT").forEach(cm => editor.dom.remove(cm));
+ editor.getBody().querySelectorAll("#CmCaReT, .CmCaReT").forEach(cm => editor.dom.remove(cm));
}