I’m trying to get CodeMirror widget size following a flexbox layout, so stretching with window is resizing, but I don’t want thet the widget resizes itself when I add text inside.
If I put a fixed size on widget (i.e. 470 px) it doesn’t stretch with window resize, and when I type on editor the scrollbars appears correctly.
If I put 100% size on widget it DOES stretch with window resize but then when I type text inside itl grows without scrollbars, which I don’t want to happen.
I have this one :
< div class = “codeArea”>
< textarea id=codeArea>
< /textarea>
< /div>
and this one :
.codeArea {
height:100%;
}
and this one :
.CodeMirror {
height:100%;
}
But the problem is still there. I tried many combination of width on both containers, but nothing… If I get it resizing with window, it also resizes typing, with no scrollbars. When I manage to get the scrollbars it stops resizing with window.
What I’m trying to have is a single-page IDE with fixed relationship between widgets. The page should NEVER expand (I don’t want the scrollbars on it) changing editor contents, and the editor should have the size set by flex layout, and not fixed by me.
The widget resizes itself with layout, but also grow when typing inside it; if I remove the height it will take a fixed height and NOT resize both when resizing window and when typing inside, no matter of the parent container settings.