MD to Rich Text(with implicit line breaks)

Posted by sylumer, Last update 6 months ago - Unlisted

Transform Markdown to Rich Text, with implicit line breaks and place result on the clipboard


  • script

    let mmd = MultiMarkdown.create();
    let strHTML = mmd.render(draft.content.replaceAll(/(\n)/gm, "  $1"));
    let strTemplate = `<html><body>
    if (!app.htmlToClipboard(strTemplate.replace("[[content]]", strHTML)))"Error could not generate HTML.");


  • 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.