fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Support for github.dev and vscode.dev #304

Closed knu closed 6 months ago

knu commented 7 months ago

Description and repro

Thanks for this amazing piece of software! I've been using it every day and recently started to wonder if it is possible for GhostText to support github.dev and vscode.dev.

I can imagine that VS Code Web browser edition has complicated internals that may prevent GhostText from working without special treatment, but when I try to activate GhostText on github.dev (you could use https://github.dev/fregante/GhostText/blob/main/readme.md as an example) it at least detects the text area and says "Connected! You can switch to your editor". However, there seems to be no sign of any new file opened on the editor. I tested with VS Code with the GhostText Official extension and Emacs with the atomic-chrome package.

Browser(s) tried

Chrome, Edge

Editor(s) tried

VS Code, Emacs

fregante commented 6 months ago

The field or field.value is not available it seems:

https://github.com/fregante/GhostText/assets/1402241/e5eb5ae4-656b-4dd5-af89-629dc017ab89

This is likely the same issue as https://github.com/fregante/GhostText/issues/283, which also uses Monaco editor internally.

In any case, I don’t think this use case should be supported for a few reasons:

Screenshot 2

If your preferred editor is emacs, it looks like there are other solutions too: