edit/page: remove all styling attributes in table editor
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 19 Aug 2018 23:20:56 +0000 (01:20 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 25 Aug 2018 21:06:04 +0000 (23:06 +0200)
Prevent accidental or misguided usage of deprecated HTML attributes
(width, height, border, cellspacing, cellpadding, align).

edit/page.js

index cdf1f211276f10ab13214fd0e38229c13de602f9..c9a6f1e93acc8e7ee5d40dd671047a3833dc8638 100644 (file)
@@ -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