Class Markdown
java.lang.Object
io.mindspice.simplypages.components.Markdown
- All Implemented Interfaces:
Component
Markdown renderer backed by CommonMark with table extension.
Immutable and thread-safe after construction. Shared parser/renderers are stateless singletons.
Security boundary: default rendering escapes raw HTML. Use createUnsafe(String) or
Markdown(String, boolean) with allowRawHtml=true only for trusted markdown sources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MarkdownCreates markdown with raw HTML escaping enabled.static MarkdowncreateUnsafe(String markdownText) Creates markdown with raw HTML passthrough.render(RenderContext context) Parses markdown and renders HTML with the configured safety mode.
-
Constructor Details
-
Markdown
Creates a markdown component with safe HTML escaping.- Parameters:
markdownText- markdown source text
-
Markdown
Creates a markdown component.- Parameters:
markdownText- markdown source textallowRawHtml- when true raw HTML in markdown is emitted (unsafe for untrusted input)
-
-
Method Details