You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to be able to embed this as a simple text editor any time I want to enter a multiline input that I can edit before submitting. There are other solutions such as inquirer which spawn an external editor to accomplish this, but it would be more useful in some cases for very simply editing to not need an external process.
I am envisioning something like this:
import { editor } from Tome;
...
const text = await editor({text:"Starting text", // other config options such as setting up key bindings, row/col count, status line, etc.
})
This function would initialize the editor with the starting text (which could be an empty string) and would return a string containing the final text that the user saved, or false if the user cancelled editing.
The text was updated successfully, but these errors were encountered:
It would be very useful to be able to embed this as a simple text editor any time I want to enter a multiline input that I can edit before submitting. There are other solutions such as
inquirer
which spawn an external editor to accomplish this, but it would be more useful in some cases for very simply editing to not need an external process.I am envisioning something like this:
This function would initialize the editor with the starting text (which could be an empty string) and would return a string containing the final text that the user saved, or
false
if the user cancelled editing.The text was updated successfully, but these errors were encountered: