Anyone know how to instantiate the Monaco diff editor as shown on the GitHub page ?
Thanks, but that’s the standard editor, I am looking to get the diff-editor running.
I think you can achieve this by cloning original monaco-editor
code and making some changes.
check this
https://snippet.webix.com/51bdhn2j
pay attention to setValue/getValue
methods.
you need to pass IDiffEditorModel
as value
I tried… but doesn’t seem to like it
config(){
return {
rows:[
{
id: "editor",
view:"monaco-diffeditor",
theme:"vs-dark"
},
{}
]
}
}
init(){
var monaco = $$("editor");
monaco.setValue( { original: "just some Text\
Hello World
Some more changes", modified: “just some text
Hello World
Some more text” } );
}