Skip to content

Commit da5dd10

Browse files
committed
auto-grow Ace text editor
1 parent b6f2c23 commit da5dd10

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎v3/js/opt-frontend-common.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ function initAceEditor(height) {
118118
pyInputAceEditor.setShowPrintMargin(false);
119119
pyInputAceEditor.setBehavioursEnabled(false);
120120

121+
// auto-grow height as fit
122+
pyInputAceEditor.setOptions({minLines: 18, maxLines: 1000});
123+
121124
$('#codeInputPane').css('width', '700px');
122-
$('#codeInputPane').css('height', height + 'px');
125+
//$('#codeInputPane').css('height', height + 'px'); // nix this, use minLines option instead
123126

124127
initDeltaObj();
125128
pyInputAceEditor.on('change', function(e) {

0 commit comments

Comments
 (0)