More markdown enhancements.
This commit is contained in:
parent
8d26d5b084
commit
6357e5794f
2 changed files with 11 additions and 0 deletions
|
|
@ -56,6 +56,9 @@
|
|||
for (const t of container.querySelectorAll('table')) {
|
||||
t.classList.add('table', 'table-sm', 'table-striped', 'table-bordered');
|
||||
}
|
||||
for (const t of container.querySelectorAll('blockquote')) {
|
||||
t.classList.add('blockquote', 'border-start', 'border-5', 'border-success', 'mt-3', 'ps-3');
|
||||
}
|
||||
}
|
||||
|
||||
function changeMode() {
|
||||
|
|
|
|||
|
|
@ -91,11 +91,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
function enhanceBlockquotes(root) {
|
||||
if (!root) return;
|
||||
for (const t of root.querySelectorAll('blockquote')) {
|
||||
t.classList.add('blockquote', 'border-start', 'border-5', 'border-success', 'mt-3', 'ps-3');
|
||||
}
|
||||
}
|
||||
|
||||
function renderHTML(el, md) {
|
||||
if (!el) return;
|
||||
el.innerHTML = renderMarkdown(md);
|
||||
enhanceLinks(el);
|
||||
enhanceTables(el);
|
||||
enhanceBlockquotes(el);
|
||||
}
|
||||
|
||||
function getMarkdown(id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue