This commit is contained in:
Sidharth Vinod
2021-05-16 20:53:06 +05:30
parent c89224aeb7
commit 96f6c74ecb
+5 -15
View File
@@ -61,10 +61,10 @@
text: editor.getValue()
});
});
// editor.layout({
// height: divEl.offsetHeight,
// width: divEl.offsetWidth
// });
editor.layout({
height: divEl.parentElement.offsetHeight,
width: divEl.offsetWidth
});
const resizeObserver = new ResizeObserver((entries) => {
editor.layout({
height: entries[0].contentRect.height,
@@ -78,14 +78,4 @@
});
</script>
<div bind:this={divEl} class="edit" />
<style>
.edit {
position: absolute;
width: 100%;
height: 90%;
left: 0;
top: 0;
}
</style>
<div bind:this={divEl} class="overflow-hidden" />