Log in or register to post comments
Last post
mgs
mgs's picture
Joined: 12/08/2010
Posts: 8
Default cellpadding, cellspacing, border for a table
When inserting a new table, the properties' dialog initially shows

- cellpadding = 1
- cellpadding = 1
- border = 1

Can these defaults be set to 0? So if a properties' dialog for a new table appears, all values are 0.

Michael G. Schneider
captain_planet's picture
Joined: 01/12/2010
Posts: 15
Re: Default cellpadding, cellspacing, border for a table
I need to know the answer for this too, so though I'd give it a bump.....

Thanks.
bjarlestam's picture
Joined: 16/02/2011
Posts: 1
Re: Default cellpadding, cellspacing, border for a table
Add this to your config.js...

CKEDITOR.on('dialogDefinition', function( ev ) {
  var dialogName = ev.data.name;
  var dialogDefinition = ev.data.definition;

  if(dialogName === 'table') {
    var infoTab = dialogDefinition.getContents('info');
    var cellSpacing = infoTab.get('txtCellSpace');
    cellSpacing['default'] = "0";
    var cellPadding = infoTab.get('txtCellPad');
    cellPadding['default'] = "0";
    var border = infoTab.get('txtBorder');
    border['default'] = "0";
  }
});