Skip to content

Html Generation Settings

Vladimir Schneider edited this page Apr 11, 2020 · 8 revisions

HTML customization settings are found in Markdown Navigator preferences in HTML Generator section.

Screen Shot Settings Html

  • Image Handling

    • Embed Images, when selected embeds images as base64 encoded data
    • Embed Remote Images, when selected embeds remote image URLs, otherwise only local images
    • Add query suffix to URI when image changes, when selected adds an integer query param which is incremented when an image file in the project changes. Needed by JavaFX WebView browser to overcome it caching an image and not updating it when the file changes.

    ℹ️ Versions prior to 3.0.xxx.79, only had options for plantuml and math fenced code block rendering. Later versions have options configured in Fenced Code Settings

    • PlantUML Rendering:
      • Embedded Library render diagram to temporary file using plantuml.jar
      • gravizo.com PNG use link to Gravizo PNG rendering https://g.gravizo.com/g?
      • gravizo.com SVG use link to Gravizo SVG rendering https://g.gravizo.com/svg?
    • Math Rendering:
      • Katex render diagrams using Katex JavaScript in the preview browser
      • codecogs.com PNG use link to CodeCogs PNG rendering https://latex.codecogs.com/png.latex?
      • codecogs.com SVG use link to CodeCogs SVG rendering https://latex.codecogs.com/svg.latex?
  • Page Handling

    • Add <!DOCTYPE html>, when selected adds tag to top of document. ⚠️ Katex scripts require this tag or they will not work.
    • Add page header, when selected adds page box with file name
    • Embed Stylesheet URL Content, when selected embeds stylesheets instead of linking to them
    • No <p> tags, use <br> to separate paragraphs, when selected, text will not be wrapped in <p> tags and <br> will be used for paragraph separation.
  • Text editor boxes let you insert custom HTML code for a particular point in the generated HTML. The location of the insertion is shown in the form to make it easier to see where the text will be inserted in the HTML document.

The customization process and effort will depend on whether you are customizing Swing HTMLEditorKit Preview, or the new JavaFX WebView Preview.

Fenced Code Diagram Rendering

Markdown Navigator Enhanced supports rendering diagram for contents of fenced code blocks based on the info string (language) of the fenced code block. Since version 3.0.xxx.79, fenced code rendering configuration is managed in Fenced Code Settings

Fenced code blocks can be rendered as an image with the diagram text encoded in the URL. Intentions to convert from fenced code to a markdown image element with an encoded URL and vice-versa are also supported.