Enable
[`automaticLayout`](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IDiffEditorOptions.html#automaticLayout)
for monaco so it can reflow itself.
Fixes: https://github.com/go-gitea/gitea/issues/21508
rulers: false,
scrollbar: {horizontalScrollbarSize: 6, verticalScrollbarSize: 6},
scrollBeyondLastLine: false,
+ automaticLayout: true,
};
function getEditorconfig(input) {
textarea.dispatchEvent(new Event('change')); // seems to be needed for jquery-are-you-sure
});
- window.addEventListener('resize', () => {
- editor.layout();
- });
-
exportEditor(editor);
const loading = document.querySelector('.editor-loading');