Opened 13 years ago
Last modified 8 years ago
#10021 confirmed Bug
Table plugin uses attributes deprecated in HTML5 — at Version 5
Reported by: | Danil | Owned by: | |
---|---|---|---|
Priority: | Nice to have (we want to work on it) | Milestone: | |
Component: | Core : Tables | Version: | |
Keywords: | Cc: |
Description (last modified by )
When I insert new table, without any settings i get border="1" cellpadding="1" cellspacing="1" style="width: 500px;" attributes. These are unexpected and non-valid ones.
Edit:
When I insert new table it uses attributes that are deprecated in HTML5
cellpadding,cellspacing,align,width,summary,rules,frame,bgcolor attributes. Please see: http://www.w3schools.com/tags/tag_table.asp
Change History (4)
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Summary: | Insert table plugin adds unexpected attributes → Table plugin uses attributes deprecated in HTML5 |
comment:4 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 13 years ago by
Component: | Core : Editable → Core : Tables |
---|---|
Description: | modified (diff) |
Status: | new → confirmed |
@danya_postfactum I have modified your description as you are right - CKEditor uses some old and deprecated attributes that should be replaced by styles in HTML5.
- When creating table one can always delete these values in table dialog (manually set values to zero or delete them)
- These default values are set in dialog plugin and the only way to change them is by setting them to empty values:
CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'table' ){ var infoTab = dialogDefinition.getContents( 'info' ); infoTab.get( 'txtBorder' ).default = ''; infoTab.get( 'txtWidth' ).default = ''; infoTab.get( 'txtCellSpace' ).default = ''; infoTab.get( 'txtCellPad' ).default = ''; } } );
How can I get rid of these deprecated attributes? I use stylesheet file to style plain tables (I guess most modern sites use it). Is any settings to tweak table plugin? It should at least use css to have any effect.