CodeEditor Show Diff

Product: PowerShell Universal
Version: 2.9.1

Hey @adam

Currently I have a page that adds to or updates a json and am displaying changes in two different code editors. I am trying to see if I can show highlighted changes inside of one code editor instead of two split editors. I noticed that the Monaco editor has a diffEditor, is that supported in the current codeEditor?

Update:

Found the -Original in New-UDCodeEditor, however, it is not displaying the highlighted changes? I tried the example from the repository.

Code:

New-UDCodeEditor -Id 'editor2' -Language 'powershell' -Theme vs-dark -Code "Get-Process" -ReadOnly -Height '500px' -Original 'Start-Process'

Is there something else I need to add?

Update:

This does not seem to work on 2.9.3, but does work on 2.7.2.

Thanks

I got it to work but manually adding the component to the dashboard. The auto load of the code editor module would not show highlighted diffs.

1 Like