Markdown Annotations

Marked & DOMPurify

Jedison supports Markdown formatting in various text fields including titles, descriptions, and info content. This is enabled by the marked.js library and activated by setting parseMarkdown: true in the Jedison configuration.

For security, all HTML output is sanitized using DOMPurify. This prevents XSS attacks while preserving safe HTML content. Sanitization is enabled with purifyHtml: true in the Jedison configuration.

Exposing dependencies

When using ES modules it may be necessary to expose, DOMPurify and marked as global variables in the window object.

// Import the libraries as ES modules
import marked from 'marked'
import DOMPurify from 'dompurify'

// Explicitly expose them to the window object
window.marked = marked
window.DOMPurify = DOMPurify