Text link > Markdown

Posted by @kerim, Last update over 1 year ago

Takes text followed by a URL and turns it into text.


  • script

    // define regex to use...
    const findRegex = /^(.*?)\s(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))/g;
    // define replacement expression...
    const replaceWith = "[$1]($2)";
    // do the replacement...
    draft.content = draft.content.replace(findRegex, replaceWith);


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