Automatically resize CSS editor

Closes T708
pull/387/head
Matt Baer 4 years ago
parent 7c1244e6b1
commit 2908080b52
  1. 3
      templates/user/collection.tmpl

@ -251,12 +251,15 @@ var $normalHandleEnv = document.getElementById('normal-handle-env');
var opt = { var opt = {
showLineNumbers: false, showLineNumbers: false,
showPrintMargin: 0, showPrintMargin: 0,
minLines: 10,
maxLines: 40,
}; };
var theme = "ace/theme/chrome"; var theme = "ace/theme/chrome";
var cssEditor = ace.edit("css-editor"); var cssEditor = ace.edit("css-editor");
cssEditor.setTheme(theme); cssEditor.setTheme(theme);
cssEditor.session.setMode("ace/mode/css"); cssEditor.session.setMode("ace/mode/css");
cssEditor.setOptions(opt); cssEditor.setOptions(opt);
cssEditor.resize(true);
</script> </script>
{{template "footer" .}} {{template "footer" .}}

Loading…
Cancel
Save