JavaScript / CodeMirror - refresh textarea

后端 未结 2 1969
傲寒
傲寒 2020-12-09 19:06

How do I use the refresh function from CodeMirror 2?

refresh()

If your code does something to change the size of t

2条回答
  •  鱼传尺愫
    2020-12-09 19:40

    The refresh method (just like all other CodeMirror methods) does not live on the DOM node, but on the instance object that's returned when you create the editor (by calling CodeMirror or CodeMirror.fromTextArea). So you'll have to store those somewhere for this to work.

提交回复
热议问题