Opened 8 years ago

Last modified 8 years ago

#9560 confirmed Bug

CKE 3.x and 4.x - Undefined table width gets reset to default — at Initial Version

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.1
Keywords: Cc:

Description

This is the continuation of #9478.

To reproduce:

  1. Clear editor contents with CRTL+A Backspace
  2. Insert default table
  3. Open table properties dialog, clear width value and click OK
  4. Open table properties one more time.

Result: Default table width 500px is present in width field and once you click OK table gets default width.

You have to use below code to see the bug

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

                // Set default table width during creation.
                if(dialogName == 'table')
                {
                    var infoTab = dialogDefinition.getContents( 'info' );
                    txtWidth = infoTab.get( 'txtWidth' );
                    txtWidth['default'] = '100%';
                }

                if ( dialogName == 'tableProperties' )
                {
                    var infoTab = dialogDefinition.getContents( 'info' );

                    var tab = dialogDefinition.getContents( 'advanced' );
                    tab.remove ('advLangDir');
                    tab.remove ('advStyles');
                    tab.remove ('advCSSClasses');
                }
            });

window.x  = CKEDITOR.editor.replace('editor1', {
    removePlugins : 'button,div,filebrowser,flash,format,forms,horizontalrule,indent,justify,liststyle,pagebreak,showborders,stylescombo,templates',
        toolbar :
            [
                ['Source', 'Table']
            ],
});

Change History (0)

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy