diff -r 488665d49417 -r 57ce13805b6f includes/clientside/tinymce/plugins/table/editor_plugin_src.js --- a/includes/clientside/tinymce/plugins/table/editor_plugin_src.js Sun Dec 21 15:35:46 2008 -0500 +++ b/includes/clientside/tinymce/plugins/table/editor_plugin_src.js Sun Dec 21 16:28:00 2008 -0500 @@ -1,5 +1,5 @@ /** - * $Id: editor_plugin_src.js 853 2008-05-27 08:05:35Z spocke $ + * $Id: editor_plugin_src.js 953 2008-11-04 10:16:50Z spocke $ * * @author Moxiecode * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. @@ -33,6 +33,27 @@ ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); }); + if (ed.getParam('inline_styles')) { + // Force move of attribs to styles in strict mode + ed.onPreProcess.add(function(ed, o) { + var dom = ed.dom; + + each(dom.select('table', o.node), function(n) { + var v; + + if (v = dom.getAttrib(n, 'width')) { + dom.setStyle(n, 'width', v); + dom.setAttrib(n, 'width'); + } + + if (v = dom.getAttrib(n, 'height')) { + dom.setStyle(n, 'height', v); + dom.setAttrib(n, 'height'); + } + }); + }); + } + ed.onInit.add(function() { if (ed && ed.plugins.contextmenu) { ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { @@ -728,7 +749,7 @@ if (!trElm || !tdElm) return true; - var grid = getTableGrid(tableElm); + var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); var cpos = getCellPos(grid, tdElm); var lastTDElm = null; @@ -759,7 +780,7 @@ if (!trElm || !tdElm) return true; - var grid = getTableGrid(tableElm); + var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); var cpos = getCellPos(grid, tdElm); var lastTDElm = null;