summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/table/editor_plugin_src.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-04-27 07:36:26 +0000
committeralecpl <alec@alec.pl>2009-04-27 07:36:26 +0000
commit29da6414db77512106250b9832a0b4a0168bd7eb (patch)
treed3f36001953d24292166ef3ab1b62e87b3b89cf6 /program/js/tiny_mce/plugins/table/editor_plugin_src.js
parent1fb5874f276e9ce7731e8f166b19a371ce33b894 (diff)
- Updated TinyMCE to 3.2.3 version
Diffstat (limited to 'program/js/tiny_mce/plugins/table/editor_plugin_src.js')
-rw-r--r--program/js/tiny_mce/plugins/table/editor_plugin_src.js27
1 files changed, 24 insertions, 3 deletions
diff --git a/program/js/tiny_mce/plugins/table/editor_plugin_src.js b/program/js/tiny_mce/plugins/table/editor_plugin_src.js
index 24635826f..80cf748a3 100644
--- a/program/js/tiny_mce/plugins/table/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/table/editor_plugin_src.js
@@ -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;