Show markdown on pages.

This commit is contained in:
Jan Böhmer 2019-10-11 23:53:12 +02:00
parent 46959b74ed
commit 7ec406d4a1
9 changed files with 462 additions and 275 deletions

View file

@ -68,8 +68,9 @@
//This is useful, to convert unsupported HTML feauters to plain text and adds an basic XSS protection
//The HTML is inside an iframe so an XSS attack can not do much harm.
data = stripHtml(data);
return converter.makeHtml(data);
}
return tmp = converter.makeHtml(data);
},
};
}
@ -80,8 +81,17 @@
CKEDITOR.addCss(
//Show borders on tables generated by Showdown
'table, th, td {\n' +
' border: 1px solid black;\n' +
'table {\n' +
' border-width: 1px 0 0 1px;\n' +
' border-color: #bbb;\n' +
' border-style: solid;\n' +
' }\n' +
'\n' +
'table td, table th {\n' +
' border-width: 0 1px 1px 0;\n' +
' border-color: #bbb;\n' +
' border-style: solid;\n' +
' padding: 10px;\n' +
'}' +
//Show code blocks
'pre {\n' +