Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

151
Vistas
Cursor is before the line number during page load

I'm using code mirror for the first time and finding it to be awesome!

So, when the page loads for the first time, the cursor goes before line number. But after I type couple of lines, all the texts start showing in proper area after line number. Any thoughts? These are the values that I've set.

var myCodeMirror = CodeMirror.fromTextArea(elt, {
  lineNumbers: true,
  mode: "xml",
  htmlMode: true, 
  lineSeparator: null,
  theme: "default",
  indentUnit: 2,
  tabSize: 4,
  indentWithTabs: true,
  lineWrapping: true, 
  tabindex: 1,
  autofocus: true,
  gutter: true,
  lineWrapping: true  
});
myCodeMirror.setSize(null,1000);

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Adding myCodeMirror.refresh(); after myCodeMirror.setSize(null,1000); solved the issue.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda