如何隐藏/取消隐藏Codemirror [英] How to hide/unhide codemirror

查看:531
本文介绍了如何隐藏/取消隐藏Codemirror的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想完全隐藏/取消隐藏Codemirror实例。
是否有任何预定义的方法可以这样做,或者我是否需要以某种方式选择div并将其隐藏。

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.

推荐答案

根据文档,CodeMirror的主编辑器对象具有一种方法,该方法可以向您返回主包装器DOM元素。

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

cm.getWrapperElement()

从那里,您应该能够像隐藏任何html元素一样隐藏元素

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

这篇关于如何隐藏/取消隐藏Codemirror的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆