mirror of
https://github.com/writeas/writefreely
synced 2025-01-08 14:02:26 +01:00
Merge pull request #387 from writeas/resize-customize-editor
Automatically resize CSS editor
This commit is contained in:
commit
3b91400b62
@ -261,12 +261,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…
Reference in New Issue
Block a user