Markdown#

This component is also available in the classic reference.

The Markdown pane allows rendering arbitrary markdown strings in a panel.

Use pn.ui.Markdown to create this component.

API#

.. py:class:: Markdown(object=None, **params) :module: panel.pane.markup

The Markdown pane allows rendering arbitrary markdown strings in a panel.

It renders strings containing valid Markdown as well as objects with a _repr_markdown_ method, and may define custom CSS styles.

Reference: https://panel.holoviz.org/reference/panes/Markdown.html

:Example:

Markdown(”# This is a header”)

:Attributes:

   **priority**
       ..

.. rubric:: Methods

.. autosummary::

  applies

.. !! processed by numpydoc !!

Parameter Definitions


Parameters inherited from:

   :class:`panel.viewable.Layoutable`: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visible

   :class:`panel.viewable.Viewable`: loading

   :class:`panel.pane.base.PaneBase`: margin, default_layout, object

   :class:`panel.pane.markup.HTMLBasePane`: enable_streaming

dedent = Boolean(default=True, label='Dedent')

    Whether to dedent common whitespace across all lines.

disable_anchors = Boolean(default=False, label='Disable anchors')

    Whether to disable automatically adding anchors to headings.

disable_math = Boolean(default=False, label='Disable math')

    Whether to disable support for MathJax math rendering for
    strings escaped with $$ delimiters.

extensions = List(bounds=(0, None), default=['extra', 'smarty', 'codehilite'], label='Extensions', nested_refs=True)

    Markdown extension to apply when transforming markup.
    Does not apply if renderer is set to 'markdown-it' or 'myst'.

hard_line_break = Boolean(default=False, label='Hard line break')

    Whether simple new lines are rendered as hard line breaks. False by
    default to conform with the original Markdown spec. Not supported by
    the 'myst' renderer.

plugins = List(bounds=(0, None), default=[], label='Plugins', nested_refs=True)

    Additional markdown-it-py plugins to use.

renderer = Selector(default='markdown-it', label='Renderer', names={}, objects=['markdown-it', 'myst', 'markdown'])

    Markdown renderer implementation.

renderer_options = Dict(class_=<class 'dict'>, default={}, label='Renderer options', nested_refs=True)

    Options to pass to the markdown renderer.

.. py:method:: Markdown.applies(object: ~typing.Any) -> float | bool | None :module: panel.pane.markup :classmethod:

  Returns boolean or float indicating whether the Pane
  can render the object.

  If the priority of the pane is set to
  `None`, this method may also be used to define a float priority
  depending on the object being rendered.















  ..
      !! processed by numpydoc !!

.. py:attribute:: Markdown.priority :module: panel.pane.markup :type: t.ClassVar[float | bool | None] :value: None