Source code for dazzler.components.markdown._markdown

"""Autogenerated file: DO NOT EDIT!"""
import typing  # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED  # noqa: F401


[docs]class Markdown(Component): """ A react-markdown wrapper for dazzler. :CSS: ``dazzler-markdown-markdown`` """ source = Aspect(required=True, docstring="Markdown string to render.") class_name = Aspect(docstring="CSS class of the container element.") style = Aspect(docstring="Style object to give to container.") skip_html = Aspect(docstring="Skip rendering of html elements.") source_pos = Aspect(docstring="Add data-sourcepos attributes to elements.") allowed_types = Aspect(docstring="Which type of node to allow rendering, default to all.") # noqa: E501 disallowed_types = Aspect(docstring="Which types of nodes should not be rendered, default to none.") # noqa: E501 unwrap_disallowed = Aspect(docstring="Setting to true will try to extract/unwrap the childrenof disallowed nodes. For instance, if disallowing Strong,the default behaviour is to simply skip the text within thestrong altogether, while the behaviour some might want is tosimply have the text returned without the strong wrapping it.") # noqa: E501 link_target = Aspect(docstring="Set the default target for link tags. (`_blank` to open a new tab)") # noqa: E501
[docs] def __init__( self, source: str, class_name: typing.Optional[str] = UNDEFINED, style: typing.Optional[typing.Dict] = UNDEFINED, skip_html: typing.Optional[bool] = UNDEFINED, source_pos: typing.Optional[bool] = UNDEFINED, allowed_types: typing.Optional[typing.List] = UNDEFINED, disallowed_types: typing.Optional[typing.List] = UNDEFINED, unwrap_disallowed: typing.Optional[bool] = UNDEFINED, link_target: typing.Optional[str] = UNDEFINED, identity: str = None ): """ :param source: Markdown string to render. :param class_name: CSS class of the container element. :param style: Style object to give to container. :param skip_html: Skip rendering of html elements. :param source_pos: Add data-sourcepos attributes to elements. :param allowed_types: Which type of node to allow rendering, default to all. :param disallowed_types: Which types of nodes should not be rendered, default to none. :param unwrap_disallowed: Setting to true will try to extract/unwrap the children of disallowed nodes. For instance, if disallowing Strong, the default behaviour is to simply skip the text within the strong altogether, while the behaviour some might want is to simply have the text returned without the strong wrapping it. :param link_target: Set the default target for link tags. (`_blank` to open a new tab) """ Component.__init__(self, locals(), identity)