r1582 - branches/bxe_2_0/mozile
[email protected] Thu, 26 Oct 2006 17:49:44 +0200 (CEST)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Thu Oct 26 17:49:43 2006
New Revision: 1582
Modified:
branches/bxe_2_0/mozile/mozCE.js
branches/bxe_2_0/mozile/mozilekb.js
Log:
added undo/redo shortcuts
Modified: branches/bxe_2_0/mozile/mozCE.js
==============================================================================
--- branches/bxe_2_0/mozile/mozCE.js (original)
+++ branches/bxe_2_0/mozile/mozCE.js Thu Oct 26 17:49:43 2006
@@ -336,7 +336,13 @@
else
{
-
+ //TESTME
+ if (this.anchorOffset >= this.anchorNode.nodeValue.strip().length) {
+ var _pos = this.focusOffset;
+ this.collapse(this.focusNode,0);
+ this.extend(this.focusNode,_pos);
+
+ }
var xmlnode = bxe_getXMLNodeByHTMLNode(this.anchorNode.parentNode);
if (xmlnode.betterNormalize) {
Modified: branches/bxe_2_0/mozile/mozilekb.js
==============================================================================
--- branches/bxe_2_0/mozile/mozilekb.js (original)
+++ branches/bxe_2_0/mozile/mozilekb.js Thu Oct 26 17:49:43 2006
@@ -178,33 +178,16 @@
eDOMEventCall("DocumentSave",document);
return true;
}
- else if(String.fromCharCode(event.charCode)== "y")
+ else if(String.fromCharCode(event.charCode)== "z")
{
- cssr = window.getSelection().getEditableXMLRange();
- if(!cssr)
- {
- alert("You have to select an edit area first");
- return false;
- }
- eDOMEventCall("toggleTagMode",cssr.top);
+ bxe_history_undo();
return true;
- }
- else if(String.fromCharCode(event.charCode) == "Y")
+ } else if(String.fromCharCode(event.charCode)== "y")
{
- cssr = window.getSelection().getEditableRange();
- if(!cssr)
- {
- alert("You have to select an edit area first");
- return false;
- }
- if (event.target.localName == "TEXTAREA") {
- eDOMEventCall("toggleSourceMode",event.target.parentNode);
- } else {
- eDOMEventCall("toggleSourceMode",cssr.top);
- }
-
+ bxe_history_redo();
return true;
}
+
return false;
}
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs