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 v21 (new update) doesn't reflect changes done on Vs Code #181

Closed jeremiahlobo closed 3 years ago

jeremiahlobo commented 3 years ago

Setup

Browser: Chrome Editor: Vs Code

Description

GhostText connects to Vs Code editor however doesn't reflect the changes on the webpage's "textfield" after typed on Vs Code using the vscode extension

fregante commented 3 years ago

Can you try Sublime Text? It’s the only one I tried so far (and others have tried Vim as well)

jeremiahlobo commented 3 years ago

I will try sublime but we use other VS code extensions while coding and love to see it working again

jeremiahlobo commented 3 years ago

image update - I tried to do the same with sublime text it does get the code on the sublime text but the change from the code doesn't show up on the textfield

In other words similar problem like VsCode

fregante commented 3 years ago

Are you working on a private site or can you share the URL?

Does it work here? https://ghosttext.github.io/GhostText/demo/

jeremiahlobo commented 3 years ago

Weirdly it works on the url you sent me, Sorry working on a private site. But We fixed it by revert this code as a hotfix and able to use it https://github.com/GhostText/GhostText/commit/faa5a8d8ea744907b1f968b915c34f30e1dd96a7 removed the code change on content.js

fregante commented 3 years ago

Thank you for identifying the issue!

Yeah I knew that code would cause trouble for some. On the demo page, the fields in the iframe don't work for example. I'll probably have to move that detection to the background.js script

DevJHennessy commented 3 years ago

Hey fregante,

I'm using Chrome and Sublime, and it's no longer working for me or my coworkers. The connection seems to be one way, where the edits made in the browser show up in Sublime, but any edits in Sublime do not translate to the browser. I tried it on your demo site with the same results. I'm getting this red pop-up that reads: "No Supported Elements Found!"

fregante commented 3 years ago

but any edits in Sublime do not translate to the browser

Do you see any messages in the browser’s console?

I tried it on your demo site with the same results. I'm getting this red pop-up that reads: "No Supported Elements Found!"

How's it possible that it doesn't work at all on that page? Can you see any errors on the console in this case as well?

DevJHennessy commented 3 years ago

Here's what I'm seeing in the console as well as on the demo page.

20210128-GhostText-Demo-Page-Screenshot 20210128-GhostText-Demo-Page-and-Console-Screenshot 20210128-GhostText-Screenshot

The console is sometimes reporting that an update from the editor is being ignored, but I've closed it down and updated the extension and it shows the same error.

fregante commented 3 years ago

I'll release a new version without that piece of code within an hour

DevJHennessy commented 3 years ago

Okay, thank you very much!

jeremiahlobo commented 3 years ago

Thanks @fregante and all you have done with ghost text, Closing this issue :)

fregante commented 3 years ago

I'll leave this open for a little bit longer so others can see if they have issues

fregante commented 3 years ago

v21.1.18 is live on Chrome.

jeremiahlobo commented 3 years ago

Thanks @fregante testing it in a min :)

jeremiahlobo commented 3 years ago

Tested and Works :) Thanks again

DevJHennessy commented 3 years ago

Thanks for the prompt update @fregante ! Glad it's working again!

jeremiahlobo commented 3 years ago

image Hey @fregante just a short update after your push, been getting this console errors, not sure if it anything to be concerned about

fregante commented 3 years ago

That's because the VSCode extension doesn't send any selection, but it should: https://github.com/jtokoph/ghosttext-vscode/blob/1e460166558d0e53bf879f6c19d15cec320ac668/extension.js#L73

You can open an issue on that repo.

fregante commented 3 years ago

Closing because Firefox will also get the latest bug-free version (whenever they get to approve it)