monaco-editor/website/playground/new-samples/creating-the-diffeditor/hello-diff-world/sample.js

9 lines
321 B
JavaScript
Raw Normal View History

var originalModel = monaco.editor.createModel("heLLo world!", "text/plain");
var modifiedModel = monaco.editor.createModel("hello orlando!", "text/plain");
var diffEditor = monaco.editor.createDiffEditor(document.getElementById("container"));
diffEditor.setModel({
original: originalModel,
modified: modifiedModel
});