Index: webapp/cms/plugins/cms/resources/js/org/ametys/cms/editor/Tables.i18n.js =================================================================== --- webapp/cms/plugins/cms/resources/js/org/ametys/cms/editor/Tables.i18n.js (revision 16107) +++ webapp/cms/plugins/cms/resources/js/org/ametys/cms/editor/Tables.i18n.js (working copy) @@ -1372,7 +1372,10 @@ tinyMCE.focus(); var parentTable = org.ametys.cms.editor.tables._getTable(tinyMCE.activeEditor.selection.getStart()); + var parentRow = Ext.get(this._currentCell).parent(); + var hasCurrentlyAColHeader = parentTable != null && org.ametys.cms.editor.tables._hasColHeader(Ext.get(parentTable)); + var hasCurrentlyARowHeader = parentTable != null && org.ametys.cms.editor.tables._hasRowHeader(Ext.get(parentTable)); tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); tinyMCE.activeEditor.execCommand('mceTableSplitCells'); @@ -1381,6 +1384,16 @@ { org.ametys.cms.editor.tables.ToggleColHeader(true); } + + if (!hasCurrentlyARowHeader && this._currentCell.tagName.toLowerCase() == 'th' && parentRow != null) + { + // Replace th by td for cells of the splitted row except the first + var cells = parentRow.select('th', false); + for (var i=1; i < cells.getCount(); i++) + { + org.ametys.cms.editor.tables._replaceCellWith(Ext.get(cells.elements[i]), 'td'); + } + } } org.ametys.cms.editor.tables.SplitCellsListener = function(button, target, node) {