Basic dark theme for simplemde

This commit is contained in:
2021-12-22 12:48:33 +00:00
parent 9d971a5654
commit c5d02620e5
2 changed files with 19 additions and 2 deletions

View File

@@ -10,12 +10,12 @@ function setupItemTable(items_json) {
newitem = -1;
}
function nl2br (str, is_xhtml) {
function nl2br(str, is_xhtml) {
var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>';
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ breakTag +'$2');
}
function escapeHtml (str) {
function escapeHtml(str) {
return $('<div/>').text(str).html();
}