0

I'm using Monaco editor and I know that I can get the original value and modified value of a diff editor with the getValue methods of the respective editor:

var originalText = diffEditor.getModifiedEditor().getValue();
var modifiedText = diffEditor.getOriginalEditor().getValue();

However, I want to know how to retrieve the contents of an inline diff editor or of the editor after merge.

Alexander Leithner
  • 3,169
  • 22
  • 33
Saurabh Sharma
  • 463
  • 2
  • 7
  • 20

1 Answers1

2

Monaco's "inline" diff editors are basically just another mode of display. You can use both functions to get the contents of the "old" or "original" file (.getOriginalEditor ().getValue ()) and the final, new contents (.getModifiedEditor ().getValue ()), just like you would do with side-by-side display.

I'm though not sure what you mean by "after merge". Monaco does not provide any merge tools, it just displays the contents of two different versions of one file.

Alexander Leithner
  • 3,169
  • 22
  • 33