In monaco code diff editor, complete content is shown in original and modified section for side by side view. Can anyone please help in a way to show only changed lines in code difference editor without unchanged contents in the diff editor.
Maybe you are looking for inline version?
https://microsoft.github.io/monaco-editor/playground.html#creating-the-diffeditor-inline-diff-example
key is setting renderSideBySide option to true
var diffEditor = monaco.editor.createDiffEditor(containerEl, {
// Render the diff inline
renderSideBySide: false
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With