Opened 12 years ago
Last modified 12 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:
- Clear editor contents with CRTL+A Backspace
- Insert default table
- Open table properties dialog, clear width value and click OK
- 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'] ], });