MCPcopy Create free account
hub / github.com/TruthHun/BookStack / RenderByMarkdown

Function RenderByMarkdown

static/js/bookstack.js:4–21  ·  view source on GitHub ↗
($content)

Source from the content-addressed store, hash-verified

2
3//渲染markdown为html
4function RenderByMarkdown($content) {
5 var testEditormdView = editormd.markdownToHTML("page-content", {
6 markdown : $content ,//+ "\r\n" + $("#append-test").text(),
7 //htmlDecode : true, // 开启 HTML 标签解析,为了安全性,默认不开启
8 htmlDecode : "style,script,iframe", // you can filter tags decode
9 //toc : false,
10 tocm : true, // Using [TOCM]
11 //tocContainer : "#custom-toc-container", // 自定义 ToC 容器层
12 //gfm : false,
13 //tocDropdown : true,
14 // markdownSourceCode : true, // 是否保留 Markdown 源码,即是否删除保存源码的 Textarea 标签
15 emoji : true,
16 taskList : true,
17 tex : true, // 默认不解析
18 flowChart : true, // 默认不解析
19 sequenceDiagram : true, // 默认不解析
20 });
21}
22
23function ilazyload(){
24 $("img.lazy").lazyload({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected