pandemonium_engine/modules/web/doc_classes/MarkdownRenderer.xml

121 lines
4.6 KiB
XML
Raw Normal View History

2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-26 17:32:25 +02:00
<class name="MarkdownRenderer" inherits="Reference" version="4.4">
2022-08-21 00:40:49 +02:00
<brief_description>
2024-04-26 18:20:41 +02:00
Renders markdown.
2022-08-21 00:40:49 +02:00
</brief_description>
<description>
2024-04-26 18:20:41 +02:00
Renders markdown (by defautl as HTML).
Rendering logic can be customized by overriding [member _renderer_callback] and setting [member render_type] to [member RENDERER_TYPE_CUSTOM].
2022-08-21 00:40:49 +02:00
</description>
<tutorials>
</tutorials>
<methods>
2024-04-26 17:32:25 +02:00
<method name="_renderer_callback" qualifiers="virtual">
<return type="void" />
<argument index="0" name="data" type="MarkdownRendererCustomRendererCallback" />
<description>
2024-04-26 18:20:41 +02:00
If you use RENDERER_TYPE_CUSTOM, this is the callback thay you are expected to implement.
2024-04-26 17:32:25 +02:00
</description>
</method>
<method name="render">
<return type="String" />
<argument index="0" name="markdown" type="String" />
<description>
2024-04-26 18:20:41 +02:00
Render a markdown document.
2024-04-26 17:32:25 +02:00
</description>
</method>
2022-08-21 00:40:49 +02:00
<method name="render_to_html">
<return type="String" />
<argument index="0" name="markdown" type="String" />
<description>
2024-04-26 18:20:41 +02:00
Deprecated. Use [member render] instead (it's the same).
2024-04-26 17:32:25 +02:00
</description>
</method>
2022-08-21 00:40:49 +02:00
</methods>
<members>
<member name="html_flags" type="int" setter="set_html_flags" getter="get_html_flags" default="0">
2024-04-26 18:20:41 +02:00
HTML render flags to use.
2022-08-21 00:40:49 +02:00
</member>
<member name="markdown_extensions" type="int" setter="set_markdown_extensions" getter="get_markdown_extensions" default="1051">
2024-04-26 18:20:41 +02:00
Enabled markdown extensions.
2022-08-21 00:40:49 +02:00
</member>
<member name="max_nesting" type="int" setter="set_max_nesting" getter="get_max_nesting" default="16">
2024-04-26 18:20:41 +02:00
Maximum nesting.
2022-08-21 00:40:49 +02:00
</member>
<member name="render_type" type="int" setter="set_render_type" getter="get_render_type" enum="MarkdownRenderer.RenderType" default="0">
2024-04-26 18:20:41 +02:00
Renderer type.
2022-08-21 00:40:49 +02:00
</member>
<member name="toc_level" type="int" setter="set_toc_level" getter="get_toc_level" default="0">
2024-04-26 18:20:41 +02:00
Toc level.
2022-08-21 00:40:49 +02:00
</member>
<member name="use_smartypants" type="bool" setter="set_use_smartypants" getter="get_use_smartypants" default="false">
2024-04-26 18:21:17 +02:00
Whether to use smartypants or not. SmartyPants translates plain ASCII punctuation characters into “smart” typographic punctuation HTML entities.
2022-08-21 00:40:49 +02:00
</member>
</members>
<constants>
<constant name="RENDER_TYPE_HTML" value="0" enum="RenderType">
2024-04-26 18:20:41 +02:00
Full html renderer.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="RENDER_TYPE_HTML_TOC" value="1" enum="RenderType">
2024-04-26 18:20:41 +02:00
Toc html renderer.
2022-08-21 00:40:49 +02:00
</constant>
2024-04-26 17:32:25 +02:00
<constant name="RENDERER_TYPE_CUSTOM" value="2" enum="RenderType">
2024-04-26 18:20:41 +02:00
Custom renderer. When rendering the [member _renderer_callback] virtual method will be called for every entity.
2024-04-26 17:32:25 +02:00
</constant>
2022-08-21 00:40:49 +02:00
<constant name="HTML_FLAG_SKIP_HTML" value="1" enum="HTMLFlags">
2024-04-26 18:20:41 +02:00
Skip html.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="HTML_FLAG_ESCAPE" value="2" enum="HTMLFlags">
2024-04-26 18:20:41 +02:00
Escape html.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="HTML_FLAG_HARD_WRAP" value="4" enum="HTMLFlags">
2024-04-26 18:20:41 +02:00
Hard wrap html.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="HTML_FLAG_USE_XHTML" value="8" enum="HTMLFlags">
2024-04-26 18:20:41 +02:00
Use XHTML.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_TABLES" value="1" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Tables extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_FENCED_CODE" value="2" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Fenced code extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_FOOTNOTES" value="4" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Footnotes extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_AUTOLINK" value="8" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Autolink extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_STRKIETHROUGH" value="16" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Strikethrough extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_UNDERLINE" value="32" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Underline extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_HIGHLIGHT" value="64" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Highlight extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_QUOTE" value="128" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Quote extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_SUPERSCRIPT" value="256" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Superscript extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_MATH" value="512" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Math extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_NO_INTRA_EMPHASIS" value="1024" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
No intra emphasis extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_SPACE_HEADERS" value="2048" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Space headers extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_MATH_EXPLICIT" value="4096" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Math explicit extension.
2022-08-21 00:40:49 +02:00
</constant>
<constant name="EXTENSION_DISABLE_INDENTED_CODE" value="8192" enum="MarkdownExtensions">
2024-04-26 18:20:41 +02:00
Disable indented code extension.
2022-08-21 00:40:49 +02:00
</constant>
</constants>
</class>