I have created a prompt statement as follows
<%* let title = await tp.system.prompt("Name the file: ", tp.file.title) await tp.file.rename("📖 MyBook - " + title) -%>
In this, the file title is input as the default value, so that the user, if accidentally touches out of the prompt area appearing before some title is typed in, can get the current title and not a null value and thus doesn’t lose at least the current title.
The current title is appearing as the default value, but if it were appeared preselected, it can be easily and quickly edited with minimum keystrokes. Even if the user decides to keep the complete current title or a part of it, he can just click somewhere as desired and continue editing easily. If he decides to change the current title completely, he can start typing over the preselected title.
I couldn’t figure out how to make the default text appear preselected in the prompt dialogue input box.
Please help achieving that!