Action

Markdown Preview & Print

Posted by @sylumer, Last update over 5 years ago

Markdown preview using the built-in Swiss style.
Selecting continue after the preview will activate printing.
Selecting cancel will end the action.

Steps

  • htmlpreview

    <!DOCTYPE html>
    <html dir="auto">
    <head>
    <title>Preview</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
    @charset "utf-8";
    
    html { 
    	font-size:100%;
    	font-family: "Helvetica Neue", "Helvetica", sans-serif;
    }
    body {
    	margin:0;
    	padding:1em;
    }
    @media (max-device-width: 480px) { 
    
    } 
    @media (min-device-width: 481px) { 
    	body {
    		margin:auto;
    		max-width:600px;
    	} 
    }
    
    blockquote {
    	font-style: italic;
    }
    
    code, pre {
        border-radius: 3px;
    	padding: .5em;
        background-color: #F8F8F8;
        color: inherit;
    }
    
    table {
      margin: 1em 0;
      border: 1px solid #aaa;
      border-collapse: collapse;
    }
    
    th {
      padding:.25em .5em;
      background: #efefef;
      border: 1px solid #ccc;  
    }
    
    td {
      padding:.25em .5em;
      border: 1px solid #ccc;
    }
    
    </style>
    </head>
    <body>
      %%[[draft]]%%
    </body>
    </html>
    
  • print

    template
    %%[[draft]]%%
    format
    html

Options

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