aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/assets/js/pages/publish.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/assets/js/pages/publish.js b/static/assets/js/pages/publish.js
index 7349fac..cc3c9c1 100644
--- a/static/assets/js/pages/publish.js
+++ b/static/assets/js/pages/publish.js
@@ -8,6 +8,12 @@ window.addEventListener("DOMContentLoaded", () => {
});
content.addEventListener("input", () => {
renderPreview.innerHTML = marked.parse(content.value);
+ // Find all tables and add class to them
+ const tables = document.getElementsByTagName("table");
+ for (let i = 0; i < tables.length; i++) {
+ tables[i].classList.add("table");
+ tables[i].classList.add("table-bordered");
+ }
renderMathInElement(renderPreview, {
// customised options
// • auto-render specific keys, e.g.: