I have a fiddle here --> http://jsfiddle.net/bagofmilk/HfDbe/5/
I'm trying to allow users to adjust the font size of the editor. The problem is that the linenumbers in the gutter shift in the gutter and sometimes outside the gutter. If you set the font size to 10px, you will see the linenumbers are not properly aligned in the gutter.
I cannot figure out which class i need to adjust. I thought it was:
$('.CodeMirror-sizer').css('width', linenumbers);
But that does not seem to work
Basically, I'm looking for the line-numbers to properly fit in the gutter each time the the font size is changed.
Call .refresh()
after changing a style that will influence the layout of the editor. That should make everything reflow properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With