差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
javascript:ace [2019/09/08 21:03] – [//#region [リージョンの説明] 〜 #endregion までをデフォルトで折り畳む方法] ともやん | javascript:ace [2019/09/08 21:07] – [//#region [リージョンの説明] 〜 //#endregion までをデフォルトで折り畳む方法] ともやん | ||
---|---|---|---|
行 126: | 行 126: | ||
ace.EditSession.prototype.foldAllRegion = function(startRow, | ace.EditSession.prototype.foldAllRegion = function(startRow, | ||
if (depth == undefined) | if (depth == undefined) | ||
- | depth = 100000; // JSON.stringify doesn' | + | |
var foldWidgets = this.foldWidgets; | var foldWidgets = this.foldWidgets; | ||
if (!foldWidgets) | if (!foldWidgets) | ||
行 155: | 行 155: | ||
}; | }; | ||
//# | //# | ||
+ | | ||
+ | jQuery(function($) { | ||
+ | const editor = ace.edit(" | ||
+ | editor.setTheme(" | ||
+ | editor.session.setMode(" | ||
+ | const lines = editors[i].getSession().getDocument().getLength(); | ||
+ | editor.setOptions({maxLines: | ||
+ | | ||
+ | // #region をデフォルトで折り畳む | ||
+ | editor.session.foldAllRegion(); | ||
+ | }); | ||
</ | </ | ||