I am trying to use CodeMirror with a particular application:
Where at column 14, should add a new line.
No whitespaces allowed.
I was trying to deal with .Codemirror, adjusting the width ‘on change’ to force a new line, example:
if (‘14’) $(’.CodeMirror’).css(‘width’, ‘164px’);
if (‘16’) $(’.CodeMirror’).css(‘width’, ‘184px’);
This because I cannot force vertical scrollbar even when not necessary, as I need to limit the number of characters per line.
Updating the .Codemirror to overflow-y: scroll or even trying to see some results in -scroll, no sucess.
Codemirror.css I went back to the default settings.
But even on “fit width”, when I load the page, then click to show the parent div of my textarea, load good:
if I hide and show again the parent div:
- How can I force vertical scroll?
- Is there a better way to force new line at column position?
- Show and Hide parent’s div of my textarea can ‘break’ the value?
- Is there a way to allow only the input of these characters: “10HLXGVC” plus Enter and Backspace?
I am very grateful for your help and patience.
Happy New Year.