sample.js 544 B

1234567891011121314151617
  1. var originalModel = monaco.editor.createModel(
  2. 'This line is removed on the right.\njust some text\nabcd\nefgh\nSome more text',
  3. 'text/plain'
  4. );
  5. var modifiedModel = monaco.editor.createModel(
  6. 'just some text\nabcz\nzzzzefgh\nSome more text.\nThis line is removed on the left.',
  7. 'text/plain'
  8. );
  9. var diffEditor = monaco.editor.createDiffEditor(document.getElementById('container'), {
  10. // You can optionally disable the resizing
  11. enableSplitViewResizing: false
  12. });
  13. diffEditor.setModel({
  14. original: originalModel,
  15. modified: modifiedModel
  16. });