10c373aeec
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com> |
||
---|---|---|
.github | ||
demo | ||
promo | ||
safari | ||
source | ||
.editorconfig | ||
.gitignore | ||
.parcelrc | ||
contributing.md | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
privacy-policy.md | ||
PROTOCOL.md | ||
readme.md |
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).
Notice: GhostText generally works but it has some bugs across the various implementations. If you use it regularly please consider contributing/bugfixing your editor's GhostText plugin.
Installation
-
Install your editor extension:
-
Install your browser extension:
Usage
- Open your editor
- Click the GhostText button in the browser’s toolbar
- Click inside the desired field (if there’s more than one)
Notice: in some editors you’ll need to run the Enable GhostText command after step 1. Refer to your editor’s GhostText extension readme. Sublime Text does this automatically.
How it works
GhostText is split in two parts:
- a HTTP and WebSocket server in the text editor
- a client in the browser
When you activate GhostText by clicking the button, the browser will try contacting the server in the text editor (at the port specified in the options) and open a WebSocket connection. Every change will be transmitted to the other side. Each side can close the socket and the session will be over.
Troubleshooting
You can verify whether it works by visiting the testing page.
No supported fields found
GhostText supports the following types of fields:
<textarea>
elementscontentEditable
areas: like in Gmail- CodeMirror editors: used on CodePen, JSFiddle, JS Bin, …
- Ace editor: used on AWS, Khan Academy, Wikipedia, …
If the website you activate it on doesn't have any of the above, it's not compatible.
Unable to connect to the editor
Ensure that:
- Your editor is open
- Its GhostText extension is installed
- The GhostText server is running (in most editor extensions this is opened automatically)
- The server port matches (it's 4001 by default, it can be changed in the options)
- There are no other servers using the port
If it still doesn't work, try again in Sublime Text, it's the main supported editor of GhostText.
Keyboard shortcuts
You can use a keyboard shortcut instead of clicking the button. The shortcut can be changed or disabled, like this in Chrome or like this in Firefox.
OS | Shortcut |
---|---|
Windows | ctrl + shift + K |
Linux | ctrl + shift + H |
Mac | cmd + shift + K |
License
MIT © Federico Brigante