rem: if (HTMLArea.is_gecko && !ev.shiftKey && !editor.config.disableEnterParagraphs) { if (editor._checkInsertP()) { 
add: if (HTMLArea.is_gecko) { if (!ev.shiftKey && !editor.config.disableEnterParagraphs) { if (editor._checkInsertP()) { HTMLArea._stopEvent(ev); } } else if (HTMLArea.is_safari) { var brNode = document.createElement("br"); editor.insertNodeAtSelection(brNode); if (!brNode.nextSibling || !HTMLArea.getInnerText(brNode.nextSibling)) { var secondBrNode = document.createElement("br"); secondBrNode = brNode.parentNode.appendChild(secondBrNode); editor.selectNode(secondBrNode, false); } 
context: HTMLArea._editorEvent = function(ev) {	if(!ev) var ev = window.event;	var target = (ev.target) ? ev.target : ev.srcElement;	var owner = (target.ownerDocument) ? target.ownerDocument : target;	if(HTMLArea.is_ie) { // IE5.5 does not report any ownerDocument		while (owner.parentElement) { owner = owner.parentElement; }	}	var editor = RTEarea[owner._editorNo]["editor"];	var keyEvent = (HTMLArea.is_ie && ev.type == "keydown") || (HTMLArea.is_gecko && ev.type == "keypress");	editor.focusEditor();	if(keyEvent) {		if(editor._hasPluginWithOnKeyPressHandler) {			for (var pluginId in editor.plugins) {				if (editor.plugins.hasOwnProperty(pluginId)) {					var pluginInstance = editor.plugins[pluginId].instance;					if (typeof(pluginInstance.onKeyPress) === "function") {						if (!pluginInstance.onKeyPress(ev)) {							HTMLArea._stopEvent(ev);							return false;						}					}				}			}			onUpdateToolbar();		}		if(ev.ctrlKey) {			if(!ev.altKey) {					// execute hotkey command				var key = String.fromCharCode((HTMLArea.is_ie || HTMLArea.is_safari || HTMLArea.is_opera) ? ev.keyCode : ev.charCode).toLowerCase();				if (HTMLArea.is_gecko && ev.keyCode == 32) key = String.fromCharCode(ev.keyCode).toLowerCase();				var cmd = null;				var value = null;				switch (key) {						// headings					case '1':					case '2':					case '3':					case '4':					case '5':					case '6':						if (editor._toolbarObjects["FormatBlock"]) { 							cmd = "FormatBlock";							value = "h" + key;							if(HTMLArea.is_ie || HTMLArea.is_safari) value = "<" + value + ">";						}						break;					case ' ':						editor.insertHTML("&nbsp;");						editor.updateToolbar();						HTMLArea._stopEvent(ev);						return false;						// other hotkeys					default:						if (editor.config.hotKeyList[key] && editor.config.hotKeyList[key].cmd) {							switch (editor.config.hotKeyList[key].cmd) {								case "SelectAll":								case "CleanWord":									cmd = editor.config.hotKeyList[key].cmd;									break;								case "Paste":									if (HTMLArea.is_ie || HTMLArea.is_safari) {										cmd = editor.config.hotKeyList[key].cmd;									} else if (editor.config.cleanWordOnPaste) {										window.setTimeout("HTMLArea.wordCleanLater(" + owner._editorNo + ", false);", 50);									}									break;								default:									if (editor._toolbarObjects[editor.config.hotKeyList[key].cmd]) {										cmd = editor.config.hotKeyList[key].cmd;										if(cmd == "FormatBlock") value = (HTMLArea.is_ie || HTMLArea.is_safari) ? "<p>" : "p";									}							}						}				}				if(cmd && !editor.config.hotKeyList[key].action) {					editor.execCommand(cmd, false, value);					HTMLArea._stopEvent(ev);					return false;				} else {					if (editor.config.hotKeyList[key] && editor.config.hotKeyList[key].action) {						if (!editor.config.hotKeyList[key].action(editor, key)) {							HTMLArea._stopEvent(ev);							return false;						}					}					editor.updateToolbar();				}			}		} else if (ev.altKey) {				// check if context menu is already handling this event			if(editor.plugins["ContextMenu"] && editor.plugins["ContextMenu"].instance) {				var keys = editor.plugins["ContextMenu"].instance.keys;				if (keys.length > 0) {					var k;					for (var i = keys.length; --i >= 0;) {						k = keys[i];						if (k[0].toLowerCase() == key) {							HTMLArea._stopEvent(ev);							return false;						}					}				}			}		} else if (keyEvent) {			if (HTMLArea.is_gecko) editor._detectURL(ev);			switch (ev.keyCode) {				case 13	: // KEY enter					if (HTMLArea.is_gecko && !ev.shiftKey && !editor.config.disableEnterParagraphs) {						if (editor._checkInsertP()) {							HTMLArea._stopEvent(ev);						}							// update the toolbar state after some time						if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);						editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(" + editor._editorNumber + ");", 100);						return false;					}					break;				case 8	: // KEY backspace				case 46	: // KEY delete					if ((HTMLArea.is_gecko && !ev.shiftKey) || HTMLArea.is_ie) {						if (editor._checkBackspace()) HTMLArea._stopEvent(ev);					}						// update the toolbar state after some time					if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);					editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(" + editor._editorNumber + ");", 50);					break;				case 9: // KEY horizontal tab					if (HTMLArea.is_gecko) {						editor.execCommand( (ev.shiftKey ? "Outdent" : "Indent"), false, null);						HTMLArea._stopEvent(ev);						return false;					}					break;				case 37: // LEFT arrow key				case 38: // UP arrow key				case 39: // RIGHT arrow key				case 40: // DOWN arrow key					if (HTMLArea.is_ie) {						if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);						editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(" + editor._editorNumber + ");", 10);						break;					}			}		}	} else {			// mouse event		if (editor._timerToolbar) window.clearTimeout(editor._timerToolbar);		if (ev.type == "mouseup") editor.updateToolbar();			else editor._timerToolbar = window.setTimeout("HTMLArea.updateToolbar(" + editor._editorNumber + ");", 50);	}};
meta: 9100	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9100/fd73e8095133c335043da22588c536e9aa7e6c50/htmlarea.js/buggy/typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js