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

188
Vistas
Monaco Editor executeEdits does not preserve undo stack

I used this piece of code in the playground of the monaco diff editor, basically tried to call executeEdits twice, and hoping each ctrl+z would undo one change. but a single ctrl+z just made it go to the initial state. where did I do wrong please?

var originalModel = monaco.editor.createModel("heLLo world!\nabc", "text/plain");
var modifiedModel = monaco.editor.createModel("hello orlando!\n\nbbb", "text/plain");

var diffEditor = monaco.editor.createDiffEditor(document.getElementById("container"));
diffEditor.setModel({
    original: originalModel,
    modified: modifiedModel
});
setTimeout(()=>{

var op = {range:modifiedModel.getFullModelRange(), text: "claire"};
diffEditor.getModifiedEditor().executeEdits(null, [op]);},2000)


setTimeout(()=>{
var op2 = {range:modifiedModel.getFullModelRange(), text: "Paul"};
diffEditor.getModifiedEditor().executeEdits(null, [op2]);},3000)
about 4 years ago · Juan Pablo Isaza
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