codemirrorをタブ付きのインターフェイスで使用していますが、codemirrorが含まれているタブにないときに行番号やカーソルのない空白の空白が表示されますタブのコンテンツがdisplay: none;
を使用して非表示になっていることがわかります。どうすればこの問題を解決できますか?事前に親divスタイルが表示ブロックになると、codemerrorをリフレッシュする方法はありますか?
var editor = CodeMirror.fromTextArea(document.getElementById($this.attr('id')), {
lineNumbers: true,
mode: text/html,
enterMode: "keep",
tabMode: "shift"
});
$(editor.getScrollerElement()).width(300);
width = $(editor.getScrollerElement()).parent().width();
$(editor.getScrollerElement()).width(width);
editor.refresh();
感謝:
はここに私のコード、(私もjqueryのを使用しています)です。