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.31k stars 117 forks source link

Start editing via context menu #131

Closed anomiex closed 3 years ago

anomiex commented 6 years ago

Setup

Browser: Firefox Editor: N/A

Description

It would be nice to be able to start editing a text area by right-clicking and selecting an appropriate option from the context menu. I'm used to doing this with It's All Text.

This could also save having to deal with the "there are multiple text areas" popup, since it should know which text area the context menu is for.

fregante commented 6 years ago

Good idea. You could also skip that step by clicking in the field first and then activating GhostText (via button or keyboard shortcut). This feature only works with textareas I think.

fregante commented 3 years ago

PR welcome. This should be "as easy as" using chrome.contextMenus.create to run the handleAction function, similarly to what already exists:

https://github.com/GhostText/GhostText/blob/261c838a8205e8fbb8cf0f5c2d3520796596431c/browser/scripts/background.js#L109-L119

mavit commented 3 years ago

This should be "as easy as"…

Indeed. I had a go at this, and it seems to be unnervingly straightforward.