mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 11:18:51 +02:00
Show markdown on pages.
This commit is contained in:
parent
46959b74ed
commit
7ec406d4a1
9 changed files with 462 additions and 275 deletions
|
@ -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' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue