Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT
79
Collect a short note from the user's configured editor and guarantee the returned text is correctly decoded to UTF-8, even when the saved file uses varied encodings.
Use the dependency-backed editor launch to decode saved files according to their detected charset, defaulting to UTF-8 when detection cannot determine the encoding.
@generates
/**
* Launches the user's preferred text editor to capture a note.
*
* @param {string} [initialText] Optional starting content to prefill the editor.
* @returns {string} The final text saved by the user, decoded to UTF-8.
*/
export function captureNote(initialText);Launches the user's preferred editor, handles charset detection of the saved file, and decodes text with a UTF-8 fallback.
Install with Tessl CLI
npx tessl i tessl/npm-external-editordocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10