monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

add merge action icons in a diff editor

Open 2Lavine opened this issue 1 year ago • 4 comments

I originally intended to support folding in the diff editor, but after reading related issues, I found that VSCode still does not support it. I want to add merge action icons between two editors in a diff editor, just like it's displayed in the Microsoft Monaco playground." Current monaco-react: image

Microsoft playground image https://microsoft.github.io/monaco-editor/playground.html?source=v0.45.0#XQAAAAIiAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0jtAyAEiAJM8XEuX7Os378jBGtVLkr6ryuhqvky-XZ9Sy0vyFSI1m9lYQpwqOsaKmhydYWIo-9hGbv_4wlPIsEpVooDN3UCgYV8kLlvOGD8rooZ1WJ_A9v5uEdBOb0AipkE4Iowchu_BgMrpPL1Ntca8LopanXcEtdWz5KKsCh_UeVKP09Ty-lq0ScxsMyFQQoUHz7UPX6EShb6_1BGocdGyMty7yhEbiFaNu0t7oNdVD7EfTq8jtjs2OL5QX8iaMMvX8twO43_yROfbw6FOvzdKtO248gmQJMdPIbf_JFI5cDQtJf25meP_NQ7wAA

2Lavine avatar Apr 26 '24 08:04 2Lavine

I try to add these options but didn't work

2Lavine avatar Apr 26 '24 08:04 2Lavine

This is what I see in the link you've sent:

Screenshot 2024-04-26 at 10 10 25

suren-atoyan avatar Apr 26 '24 15:04 suren-atoyan

@suren-atoyan you might need a few lines of code for it to appear.

https://microsoft.github.io/monaco-editor/playground.html?source=v0.45.0#example-creating-the-diffeditor-multi-line-example

image

LewisLim avatar Jun 04 '24 07:06 LewisLim

Solved it adding this prop: options={{ glyphMargin: true }} somehow!

erikologic avatar Aug 12 '24 16:08 erikologic