Add parsing of markdown when editing event items

This commit is contained in:
Tom Price
2016-01-07 20:55:21 +00:00
parent e645b72492
commit 7e0e6b6b3e
8 changed files with 94 additions and 83 deletions

View File

@@ -106,7 +106,7 @@ $('body').on('submit', '#item-form', function (e) {
// update the table
$row = $('#item-' + pk);
$row.find('.name').html(escapeHtml(fields.name));
$row.find('.description').html(nl2br(escapeHtml(fields.description)));
$row.find('.description').html(marked(fields.description));
$row.find('.cost').html(parseFloat(fields.cost).toFixed(2));
$row.find('.quantity').html(fields.quantity);
@@ -136,4 +136,4 @@ $("#item-table tbody").sortable({
});
}
});
});

6
RIGS/static/js/marked.min.js vendored Normal file

File diff suppressed because one or more lines are too long