Insert Number

Posted by agiletortoise, Last update almost 3 years ago

Convenience action for typing numbers on iOS.

This action opens a prompt with a single text input and the iOS decimal keyboard active to allow easier typing of numeric values. After accepting the input, the number is inserted in the current draft at the cursor position.

If you find this useful, you might also be interested in the Numbers+ action group, which provides a row of number keys to use in the Action Bar over the keyboard.


  • script

    // prompt for input using the numeric keyboard (iOS only)
    let p = new Prompt();
    p.title = "Enter Value"
    p.addTextField("n", "Number", "", {
    	"autocorrect": false,
    	"keyboard":  "decimalPad",
    	"wantsFocus": true
    if( && p.buttonPressed == "Insert") {
    	let [st, len] = editor.getSelectedRange();
    	let s = p.fieldValues["n"];
    	editor.setSelectedRange(st+s.length, 0);


  • After Success Default
    Notification None
    Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.