Anyone know how to instantiate the Monaco diff editor as shown on the GitHub page ?
@Splay
did you try this?
https://docs.webix.com/desktop__text_editors.html#monaco
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
That’s amazing @intregal thank you.
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” } );
}
@Splay
you need to wait for editor creation
https://snippet.webix.com/40j5he9k
@intregal genius, thank you.