I\'m trying to add the Ace editor to a page, but I don\'t know how to get the height to be set automatically based on the length of its contents.
Ideally it would wo
My method in pure JavaScript (replace editor-container with the right id).
editor-container
function adaptEditor() { document.getElementById('editor-container').style.height = window.innerHeight + 'px'; editor.resize(); } window.onresize = function(event) { adaptEditor(); }; adaptEditor();