1
0

creating-the-diffeditor-inline-diff-example.js 1.0 KB

123
  1. // This is a generated file. Please do not edit directly.
  2. var SAMPLES = this.SAMPLES || [];
  3. SAMPLES.push({"id":"creating-the-diffeditor-inline-diff-example","js":"//---------------------------------------------------\n// Creating the DiffEditor > Inline Diff Example\n//---------------------------------------------------\n\nvar originalModel = monaco.editor.createModel(\"This line is removed on the right.\\njust some text\\nabcd\\nefgh\\nSome more text\", \"text/plain\");\nvar modifiedModel = monaco.editor.createModel(\"just some text\\nabcz\\nzzzzefgh\\nSome more text\\nThis line is removed on the left.\", \"text/plain\");\n\nvar diffEditor = monaco.editor.createDiffEditor(document.getElementById(\"container\"), {\n\t// You can optionally disable the resizing\n\tenableSplitViewResizing: false,\n\n\t// Render the diff inline\n\trenderSideBySide: false\n});\ndiffEditor.setModel({\n\toriginal: originalModel,\n\tmodified: modifiedModel\n});\n","html":"<div id=\"container\" style=\"height:100%;\"></div>\n","css":""});