Action
Insert Number
Posted by agiletortoise,
Last update
5 days ago
Open a prompt with a text input using the number keyboard on iOS.
This is a convenience feature for quickly typing numeric values.
Steps
-
script
let p = new Prompt() p.title = "Insert Number" p.addTextField("n", "", "", { "keyboard": "decimalPad", // or change to "numberPad" for ints, "wantsFocus": true }) p.addButton("Insert") if (p.show()) { const n = p.fieldValues["n"] let [st, len] = editor.getSelectedRange() editor.setSelectedText(n) editor.setSelectedRange(st+n.length, 0) }
Options
-
After Success Nothing Notification Info Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.