Drafts Action Directory

Insert dictation

Posted by agiletortoise, Last update 5 months ago

Open dictation and insert the result at the current cursor position in the editor.

Install

Steps

  • script

    // open dictation to insert in current draft
    
    // store selection
    const [st, len] = editor.getSelectedRange();
    
    // dictate
    var s = editor.dictate();
    if (s.length > 0) {
    	editor.setTextInRange(st, len, s);
    	editor.setSelectedRange(st + s.length, 0);
    	editor.activate();
    }

Options

  • After Success Default
    Notification Error
    Log Level Error

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.