From: Mischa POSLAWSKY Date: Sun, 19 Aug 2018 23:20:56 +0000 (+0200) Subject: edit/page: remove all styling attributes in table editor X-Git-Tag: v3.7~20 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/81dcf42eb0bd11110ec30ce3840718b259ec5082 edit/page: remove all styling attributes in table editor Prevent accidental or misguided usage of deprecated HTML attributes (width, height, border, cellspacing, cellpadding, align). --- diff --git a/edit/page.js b/edit/page.js index cdf1f21..c9a6f1e 100644 --- a/edit/page.js +++ b/edit/page.js @@ -51,11 +51,13 @@ CKEDITOR.on('dialogDefinition', function (event) { switch (event.data.name) { case 'table': // override initial attribute values - var infoTab = event.data.definition.getContents('info'); - infoTab.get('txtWidth').default = ''; - infoTab.get('txtBorder').default = '0'; - infoTab.get('txtCellSpace').default = ''; - infoTab.get('txtCellPad').default = ''; + var infotab = event.data.definition.getContents('info'); + infotab.remove('txtWidth'); + infotab.remove('txtHeight'); + infotab.remove('txtBorder'); + infotab.remove('txtCellSpace'); + infotab.remove('txtCellPad'); + infotab.remove('cmbAlign'); break; case 'link': // hide unneeded widgets from the Link Info tab