eidos.plugins.markdown

EidosUI Markdown Plugin - Theme-aware markdown rendering

This plugin provides markdown rendering that automatically integrates with EidosUI themes through CSS variables.

Basic usage: from eidos.plugins.markdown import Markdown, MarkdownCSS

# In your document head MarkdownCSS()

# In your content Markdown("# Hello World\n\nThis is <strong>markdown</strong>!")

Markdown(content: str, class_: str | None = None, **kwargs) -> air.tags.models.stock.Div

GitHub

Main markdown component that renders markdown content with theme integration.

Args:

  • content: Markdown text to render
  • class_: Additional CSS classes to apply
  • **kwargs: Additional attributes to pass to the wrapper div

Returns:

air.Div containing the rendered markdown HTML

Parameters:

  • content: <class 'str'>
  • class_: str | None = None

Returns: <class 'air.tags.models.stock.Div'>

MarkdownCSS() -> air.tags.models.stock.Link

GitHub

Returns a link tag to include the markdown CSS.

This should be included in the head of your document to ensure markdown styling is available.

Returns:

air.Link element pointing to the markdown CSS file

Returns: <class 'air.tags.models.stock.Link'>

class MarkdownRenderer

GitHub

Core markdown rendering with theme integration.

Warning: This renderer outputs raw HTML without sanitization to support advanced features like forms, embeds, and custom styling. Never use with untrusted user content without additional sanitization.

Methods:

  • __init__(self, extensions: list[str | markdown.extensions.Extension] | None = None) — Initialize the renderer with optional extensions.
  • add_extension(self, extension: str | markdown.extensions.Extension) -> None — Add a markdown extension.
  • render(self, markdown_text: str) -> str — Convert markdown to themed HTML.