Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide/unhide codemirror

I want to hide/unhide a codemirror instance completely. Is there any predefined method doing that, or do I need to somehow select the div and make it hidden.

like image 626
Borstenhorst Avatar asked Dec 16 '22 08:12

Borstenhorst


1 Answers

according to the documentation, CodeMirror's main editor object has a method that returns to you the main wrapper DOM element.

cm.getWrapperElement()

From there, you should be able to just hide the element like you would hide any html element.

like image 171
Lochemage Avatar answered Dec 17 '22 21:12

Lochemage