Action

Markdown Image Link

Posted by iamjeffperry, Last update 14 days ago - Unlisted

Steps

  • script

    // Create Markdown image link
    
    var sel = editor.getSelectedText();
    var selRange = editor.getSelectedRange();
    
    if (!sel || sel.length == 0) {
      editor.setSelectedText("![]()");
      editor.setSelectedRange(selRange[0]+4,0);
    }
    else {
      editor.setSelectedText("["+sel+"]()");
      editor.setSelectedRange(selRange[0]+selRange[1]+1,0);
    }

Options

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