dazzler.components.markdown package¶
- class dazzler.components.markdown.CodeBlock(value, language, style=undefined, class_name=undefined, identity=None)[source]¶
Bases:
dazzler.system._component.Component
A block of code to highlight.
Wrapper of
prism-react-renderer
.- CSS
dazzler-markdown-code-block
- class_name¶
- language¶
Language to render
- style¶
- value¶
The code to render
- class dazzler.components.markdown.Markdown(source, class_name=undefined, style=undefined, skip_html=undefined, source_pos=undefined, allowed_types=undefined, disallowed_types=undefined, unwrap_disallowed=undefined, link_target=undefined, identity=None)[source]¶
Bases:
dazzler.system._component.Component
A react-markdown wrapper for dazzler.
- CSS
dazzler-markdown-markdown
- __init__(source, class_name=undefined, style=undefined, skip_html=undefined, source_pos=undefined, allowed_types=undefined, disallowed_types=undefined, unwrap_disallowed=undefined, link_target=undefined, identity=None)[source]¶
- Parameters
source (
str
) – Markdown string to render.class_name (
Optional
[str
]) – CSS class of the container element.style (
Optional
[Dict
]) – Style object to give to container.skip_html (
Optional
[bool
]) – Skip rendering of html elements.source_pos (
Optional
[bool
]) – Add data-sourcepos attributes to elements.allowed_types (
Optional
[List
]) – Which type of node to allow rendering, default to all.disallowed_types (
Optional
[List
]) – Which types of nodes should not be rendered, default to none.unwrap_disallowed (
Optional
[bool
]) – 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.link_target (
Optional
[str
]) – Set the default target for link tags. (_blank to open a new tab)
- allowed_types¶
Which type of node to allow rendering, default to all.
- class_name¶
CSS class of the container element.
- disallowed_types¶
Which types of nodes should not be rendered, default to none.
- link_target¶
Set the default target for link tags. (_blank to open a new tab)
- skip_html¶
Skip rendering of html elements.
- source¶
Markdown string to render.
- source_pos¶
Add data-sourcepos attributes to elements.
- style¶
Style object to give to container.
- unwrap_disallowed¶
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.