添加iframe支持(conf enable_iframe)

This commit is contained in:
gsw945
2021-10-09 18:22:43 +08:00
parent 8515abcd9d
commit b624fea255
15 changed files with 240 additions and 16 deletions

View File

@@ -3,6 +3,10 @@ $(function () {
js : window.katex.js,
css : window.katex.css
};
var htmlDecodeList = ["style","script","title","onmouseover","onmouseout","style"];
if (!window.IS_ENABLE_IFRAME) {
htmlDecodeList.unshift("iframe");
}
window.editor = editormd("docEditor", {
width: "100%",
height: "100%",
@@ -18,8 +22,8 @@ $(function () {
taskList: true,
flowChart: true,
mermaid: true,
htmlDecode: "style,script,iframe,title,onmouseover,onmouseout,style",
lineNumbers: false,
htmlDecode: htmlDecodeList.join(','),
lineNumbers: true,
sequenceDiagram: true,
highlightStyle: window.highlightStyle ? window.highlightStyle : "github",
tocStartLevel: 1,