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

GhostText not working on coderpad.io (Monaco Editor) #288

Closed huangyingw closed 12 months ago

huangyingw commented 12 months ago

Setup Information:

Browser: Google Chrome
Editor: Neovim (nvim)

Description of the Issue:

I have been using the GhostText extension with Google Chrome and Neovim as my editor. However, I've encountered an issue where GhostText does not work when I try to use it with https://app.coderpad.io/.

Interestingly, when I use GhostText on other sites, such as when creating a new issue on https://github.com/fregante/GhostText/issues/new, it functions correctly. This leads me to believe that there may be an issue specifically with app.coderpad.io's compatibility with GhostText.

Is there anything that can be done to enable GhostText compatibility with app.coderpad.io?

fregante commented 12 months ago

https://app.coderpad.io/sandbox

It seems to be a Monaco Editor instance (https://github.com/fregante/GhostText/pull/239) but globalThis.monaco isn't set, so I don't know of any way to access the editor data.

There's a globalThis.editor property though so that could be used, if standard.

This seems to be the same issue as https://github.com/fregante/GhostText/issues/283