Action

Hashtag

Posted by Ryan Cheley, Last update about 5 years ago - Unlisted

Converts a string to a hashtag using a JavaScript

Steps

  • script

    // See online documentation for examples
    // http://getdrafts.com/scripting
    
    var contents = draft.content;
    var newContents = "#";
    
    
    editor.setText(newContents+contents.replace(/ /g, "").toLowerCase());
  • clipboard

    template
    [[draft]]

Options

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