Templater
Templater copied to clipboard
Feature: multiline input with `tp.system.prompt`
I've added a new multi-line input prompt inspired by chhoumann/QuickAdd. See here for original.
It can be invoked using
let default_value = "Original";
let prompt_text = "Prompt Title Here";
let throw_on_cancel = false;
let multi_line = true;
tR += await tp.system.prompt(prompt_text, default_value, throw_on_cancel, multi_line);
Sample:
This is an optional variable that shouldn't introduce any breaking changes. I haven't had a chance to test this on mobile.
Note: the event handler for mobile behaves slightly differently. For multi-line inputs, the Submit button must be used as the enter key moves the cursor to the next line.
Please let me know if there's any cleanup I should do.
If anyone needs this, feel free to install 1.13.0 from my fork via BRAT.
I did that for the brat thing. I'll split that off into a separate branch next time.