From be188ffac98a3d824a1e143e1a5766801130c876 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 11 Jul 2014 18:07:59 +0200 Subject: [PATCH] edit: customise default table attributes Prevent unwanted values for styling attributes. --- edit.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/edit.js b/edit.js index 37e1444..94e84cc 100644 --- a/edit.js +++ b/edit.js @@ -25,6 +25,17 @@ CKEDITOR.plugins.add('inlinesave', { } }); +CKEDITOR.on('dialogDefinition', function (event) { + if (event.data.name === '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 = ''; + } +}); + CKEDITOR.on('instanceCreated', function (event) { var editor = event.editor; editor.on('configLoaded', function () { -- 2.30.0