Skip to content

DiffEditor

github-actions[bot] edited this page May 16, 2024 · 5 revisions

diff

Lookup

// through editors view
const diffEditor1 = await new EditorView().openEditor("editorTitle");

// directly
const diffEditor2 = new DiffEditor();

Working with the Contents

Since diff editor is basicaly two text editors in one, the DiffEditor object gives you the ability to work with two editors:

// get the original editor
const original = await diffEditor1.getOriginalEditor();

// get the modified editor
const changed = await diffEditor1.getModifiedEditor();