Project

General

Profile

Feature #16079 » rtehtmlarea_feature_6064_ie.patch

Administrator Admin, 2008-03-12 21:47

View differences:

typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (working copy)
*
* (c) 2002 interactivetools.com, inc. Authored by Mihai Bazon, sponsored by http://www.bloki.com.
* (c) 2005 Xinha, http://xinha.gogo.co.nz/ for the original toggle borders function.
* (c) 2004-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
* (c) 2004-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
this.classesUrl = this.editorConfiguration.classesUrl;
this.buttonsConfiguration = this.editorConfiguration.buttons;
this.disableEnterParagraphs = this.buttonsConfiguration.table ? this.buttonsConfiguration.table.disableEnterParagraphs : false;
this.floatLeft = "float-left";
this.floatRight = "float-right";
this.floatDefault = "not set";
......
* Registering plugin "About" information
*/
var pluginInformation = {
version : "4.0",
version : "4.1",
developer : "Mihai Bazon & Stanislas Rolland",
developerUrl : "http://www.fructifor.ca/",
developerUrl : "http://www.sjbr.ca/",
copyrightOwner : "Mihai Bazon & Stanislas Rolland",
sponsor : this.localize("Technische Universitat Ilmenau") + " & Zapatec Inc.",
sponsorUrl : "http://www.tu-ilmenau.de/",
......
}
}
}
},
/*
* This function gets called by the main editor event handler when a key was pressed.
* It will process the enter key for IE when buttons.table.disableEnterParagraphs is set in the editor configuration
*/
onKeyPress : function (ev) {
if (HTMLArea.is_ie && ev.keyCode == 13 && !ev.shiftKey && this.disableEnterParagraphs) {
var selection = this.editor._getSelection();
var range = this.editor._createRange(selection);
var parentElement = this.editor.getParentElement(selection, range);
while (parentElement && !HTMLArea.isBlockElement(parentElement)) {
parentElement = parentElement.parentNode;
}
if (/^(td|th)$/i.test(parentElement.nodeName)) {
range.pasteHTML("<br />");
return false;
}
}
return true;
}
});
(2-2/2)