From f89fd5c6ac8ddb68ed5dc9f1ab534540d293f3d2 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 18 Oct 2018 14:14:18 +0530 Subject: [PATCH] fix(Quill): Add class table-bordered to tables --- frappe/public/js/frappe/form/controls/text_editor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/controls/text_editor.js b/frappe/public/js/frappe/form/controls/text_editor.js index fdd20259e3..af306d461a 100644 --- a/frappe/public/js/frappe/form/controls/text_editor.js +++ b/frappe/public/js/frappe/form/controls/text_editor.js @@ -13,7 +13,13 @@ Quill.register(Block, true); // table const Table = Quill.import('formats/table-container'); -Table.className = 'table'; +const superCreate = Table.create.bind(Table); +Table.create = (value) => { + const node = superCreate(value); + node.classList.add('table'); + node.classList.add('table-bordered'); + return node; +} Quill.register(Table, true); // inline style