UNPKG

@teipublisher/pb-components

Version:
77 lines (69 loc) 3.19 kB
<html> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"/> <title>pb-markdown Demo</title> <script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script> </head> <body> <pb-demo-snippet> <template> <style> pb-markdown { margin-bottom: 10px; } .example { color: #333333; font-family: "Oswald", Verdana, "Helvetica", sans-serif; font-weight: normal; border-bottom: 1px solid #4b4b4b; margin-top: 1em; font-size: 1.25em; } .toolbar { display: flex; } </style> <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher" api-version="1.0.0"> <div class="toolbar"> <pb-zoom direction="in" icon="icons:zoom-in"></pb-zoom> <pb-zoom direction="out" icon="icons:zoom-out"></pb-zoom> </div> <h1 class="example">Embedded Markdown</h1> <pb-markdown> # Embedding Markdown Markdown taken from the **content** of the `pb-markdown`. * A list item 1. first subpoint 1. second subpoint * Another list item ```xquery for $i in 1 to 10 return $i * 2 ``` </pb-markdown> <h1 class="example">Markdown using literal HTML</h1> <pb-markdown> <template> # Embedded HTML To pass markdown with embedded HTML, enclose the content into a `template`. <p>This is <strong>embedded</strong> HTML</p> </template> </pb-markdown> <h1 class="example">Shows fallback message</h1> <pb-markdown url="https://teipublisher.com/xxx.md"> **Failed to load content**! </pb-markdown> <h1 class="example">Resolve relative URLs</h1> <pb-markdown url="api/document/about.md">**Loading** content</pb-markdown> <h1 class="example">Load from absolute URL</h1> <pb-markdown url="https://raw.githubusercontent.com/eXist-db/exist/develop/README.md"> **Loading** content ... </pb-markdown> </pb-page> </template> </pb-demo-snippet> </body> </html>