diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-11-17 11:11:11 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-11-17 11:11:11 +0100 |
commit | 89ad259050898faef183dcec50481ed83e08eb7c (patch) | |
tree | 253c99f584e78ad136c4051e97386b2c7fa14876 | |
parent | 0e8b13841a921bef6492e20e478cf27976384d84 (diff) | |
download | volse-hubzilla-89ad259050898faef183dcec50481ed83e08eb7c.tar.gz volse-hubzilla-89ad259050898faef183dcec50481ed83e08eb7c.tar.bz2 volse-hubzilla-89ad259050898faef183dcec50481ed83e08eb7c.zip |
configure ace with setOptions, get rid of redundant scrollbars
-rw-r--r-- | view/tpl/wiki.tpl | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 54d501396..f8073c080 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -218,14 +218,23 @@ }); var editor = ace.edit("ace-editor"); - editor.setTheme("ace/theme/github"); - editor.setShowPrintMargin(false); - editor.getSession().setUseWrapMode('free'); - editor.getSession().setMode("ace/mode/markdown"); + editor.setOptions({ + theme: "ace/theme/github", + mode: "ace/mode/markdown", + + wrap: true, + + minLines: 30, + maxLines: Infinity, + + printMargin: false, + }); + editor.getSession().setValue(window.wiki_page_content); - window.editor = editor; // Store the editor in the window object so the anonymous function can use it. - $('#edit-pane-tab').click(function (ev) { - setTimeout(function() {window.editor.focus();}, 500); // Return the focus to the editor allowing immediate text entry + window.editor = editor; // Store the editor in the window object so the anonymous function can use it. + + $('#edit-pane-tab').click(function (ev) { + setTimeout(function() {window.editor.focus();}, 500); // Return the focus to the editor allowing immediate text entry }); $('#wiki-get-preview').click(function (ev) { |