We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 41015b4 + 96141da commit eef8816Copy full SHA for eef8816
1 file changed
plugins/Themer/src/editor.html
@@ -40,17 +40,15 @@
40
});
41
42
require(["vs/editor/editor.main"], () => {
43
- const editor = window.editor = monaco.editor.create(
44
- document.getElementById("container"),
45
- {
46
- value: window.themerCSS,
47
- language: "css",
48
- theme: "vs-dark",
49
- smoothScrolling: true,
50
- }
51
- );
+ const container = document.getElementById("container");
+ const editor = window.editor = monaco.editor.create(container, {
+ value: window.themerCSS,
+ language: "css",
+ theme: "vs-dark",
+ smoothScrolling: true,
+ });
52
editor.onDidChangeModelContent(() => ipcRenderer.setCSS(editor.getValue()));
53
- window.addEventListener("resize", editor.layout.bind(editor));
+ new ResizeObserver(() => editor.layout()).observe(container);
54
55
</script>
56
</body>
0 commit comments