DEV Community

lef237
lef237

Posted on

One-Time Editor, an editor for drafts before sending

I've created an app called "One-Time Editor".

Dark Mode

The image above shows dark mode. Here's what it looks like in light mode.

Light Mode

What kind of app is it, you ask? It's a text editor that can be used for drafting messages before sending them in a chat.

By using this app, you can avoid the worry of accidentally sending a message prematurely by hitting Enter.

To quickly understand how it works, I recommend watching the video, which I've attached below.

https://youtu.be/qwj9fr77vQg

How to Install

For macOS, use Homebrew. You can start using it right away by typing the following commands in your terminal.

brew tap lef237/tap
brew install --cask one-time-editor
Enter fullscreen mode Exit fullscreen mode

Since it's an Electron-based app, it's also cross-platform compatible.

Windows and Linux users can install the pre-built app from here.

https://github.com/lef237/one-time-editor/releases

Windows users should select the .exe file, and Linux users should select the AppImage to install it. 1

Features

The main highlight is that you can toggle (show/hide) the window using a keyboard shortcut.

What's more, it automatically copies the content you've entered as soon as you toggle it, allowing for instant pasting.

  1. Open One-Time Editor with a keyboard shortcut.
  2. Type the content you want to send.
  3. Close it with the keyboard shortcut.
    • The content will be automatically copied.
    • On macOS, focus will automatically return to the window you were previously using.
  4. Paste and then send.

It also supports switching between light and dark modes. I think the design is also stylish.

Of course, you can also customize the keyboard shortcut! The default is Ctrl+J, but feel free to assign any shortcut you like.

Why I Made It

Many people have probably experienced indecision about whether to use Enter, Shift+Enter, or Ctrl+Enter to send a chat message.

And then, accidentally sending a message in the middle of writing...

Using some kind of editor for drafting isn't bad, but it can be a bit cumbersome to constantly be asked to create a new file or to manage windows.

This app is designed for throwaway writing, and it allows for displaying/hiding the window and copying content with a single shortcut, making it quite fast.

Challenges During Development

There were several challenges.

However, the most difficult problem was dealing with code signing and notarization.

When you create an app with Electron, it works fine on your local machine, but if you upload it to the internet and download it, the app becomes corrupted.

You might have seen this warning when downloading things like Docker:

warning

Therefore, you need to use the xattr command.

This means you need to run the command xattr -rc "/Applications/hoge.app" after installation, which is a bit troublesome.

When I looked into simplifying this, I realized that using postflight could automate this process if installed via homebrew-tap.

If you're looking to distribute Electron apps, please use this as a reference!

GitHub

GitHub is also public.

If you have any feature requests, please open an Issue. 🐘

GitHub logo lef237 / one-time-editor

A lightweight scratchpad that lives one shortcut away

One-Time Editor

A lightweight scratchpad that lives one shortcut away. Draft a message, hit the shortcut again, and it's already on your clipboard β€” ready to paste anywhere.

Built for the workflow of writing chat messages, AI prompts, and quick notes that you type once and send.

Demo

https://youtu.be/qwj9fr77vQg

Install

macOS (Homebrew)

brew tap lef237/tap
brew install --cask one-time-editor
Enter fullscreen mode Exit fullscreen mode

Manual download

Pre-built binaries for macOS, Windows, and Linux are available on the Releases page.

If you download manually on macOS, the app is not signed with an Apple Developer certificate, so macOS may show a warning. To allow it, run:

xattr -cr "/Applications/One-Time Editor.app"
Enter fullscreen mode Exit fullscreen mode

How it works

  1. Press Ctrl+J to summon the editor
  2. Type your text
  3. Press the shortcut again β€” the window disappears and your text is copied to clipboard
  4. Paste wherever you need it

That's it. No save dialog, no file management, no friction.

The shortcut is…

https://github.com/lef237/one-time-editor


  1. If it doesn't work on Windows or other OSs, please comment on GitHub! ↩

Top comments (0)