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

Make browser buffer read-only during the edit #252

Closed jidanni closed 1 year ago

jidanni commented 1 year ago

When we do an edit, the borders of the textbox become sky blue.

But we can still type inside the box!

That can only lead to mistakes, as we are also editing the buffer elsewhere!

Therefore not only should it become blue, but also become read-only.

fregante commented 1 year ago

That is a core functionality of GhostText. Since the field is marked as connected, you can see what you're doing and avoid typing in it

jidanni commented 1 year ago

Actually I wouldn't need the expense of having simultaneous typing, because I only have one big window on my screen at a time. And I only look back at the browser when I'm finished anyway. But I'm just worried if I get distracted and then come back to the computer and then start typing into the big blue box by accident. Anything I type in there would be lost. Also I think you can make something read-only, but still update it because you're in control of it anyway.

fregante commented 1 year ago

Anything I type in there would be lost.

It wouldn't be lost, that's the point of two-way synchronization

jidanni commented 1 year ago

I see.

By the way I found

(defcustom atomic-chrome-enable-auto-update t
  "If non-nil, edit on Emacs is reflected to the browser instantly, \
otherwise you need to type \"C-cC-s\" manually."
  :type 'boolean
  :group 'atomic-chrome)

(defcustom atomic-chrome-enable-bidirectional-edit t
  "If non-nil, you can edit both on Chrome text area and Emacs, \
otherwise edit on Chrome is ignored while editing on Emacs."
  :type 'boolean
  :group 'atomic-chrome)

if one day I want to tinker with this.