Changeset 400
- Timestamp:
- 2007-06-29 14:24:58 (17 months ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 1 added
- 2 removed
- 5 modified
-
editor/fckeditor.html (modified) (1 diff)
-
editor/_source/internals/fck_gecko.js (modified) (1 diff)
-
editor/_source/internals/fck_ie.js (modified) (2 diffs)
-
editor/_source/internals/fck.js (modified) (1 diff)
-
editor/_source/internals/fckundo_gecko.js (deleted)
-
editor/_source/internals/fckundo_ie.js (deleted)
-
editor/_source/internals/fckundo.js (added)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/fckeditor.html
r302 r400 82 82 LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ; 83 83 LoadScript( '_source/internals/fckcodeformatter.js' ) ; 84 LoadScript( '_source/internals/fckundo _' + sSuffix + '.js' ) ;84 LoadScript( '_source/internals/fckundo.js' ) ; 85 85 LoadScript( '_source/classes/fckeditingarea.js' ) ; 86 86 LoadScript( '_source/classes/fckkeystrokehandler.js' ) ; -
FCKeditor/trunk/editor/_source/internals/fck_gecko.js
r398 r400 25 25 26 26 FCK.Description = "FCKeditor for Gecko Browsers" ; 27 28 FCK._KeyDownUndo = function()29 {30 if ( !FCKUndo.Typing )31 {32 FCKUndo.SaveUndoStep() ;33 FCKUndo.Typing = true ;34 FCK.Events.FireEvent( "OnSelectionChange" ) ;35 }36 37 FCKUndo.TypesCount++ ;38 FCKUndo.Changed = 1;39 40 if ( FCKUndo.TypesCount > FCKUndo.MaxTypes )41 {42 FCKUndo.TypesCount = 0 ;43 FCKUndo.SaveUndoStep() ;44 }45 }46 47 FCK._IsFunctionKey = function(keyCode)48 {49 // keys that are captured but do not change editor contents50 if (keyCode >= 16 && keyCode <= 20)51 // shift, ctrl, alt, pause, capslock52 return true;53 if (keyCode == 27 || (keyCode >= 33 && keyCode <= 40))54 // esc, page up, page down, end, home, left, up, right, down55 return true;56 if (keyCode == 45)57 // insert, no effect on FCKeditor, yet58 return true;59 return false;60 }61 62 FCK._KeyDownListener = function( evt )63 {64 if ( FCK.EditorWindow )65 {66 if ( !FCK._IsFunctionKey(evt.keyCode) // do not capture function key presses, like arrow keys or shift/alt/ctrl67 && !(evt.ctrlKey || evt.metaKey) // do not capture Ctrl hotkeys, as they have their snapshot capture logic68 && !(evt.keyCode == 46) ) // do not capture Del, it has its own capture logic in fckenterkey.js69 FCK._KeyDownUndo();70 }71 return true;72 }73 27 74 28 FCK.InitializeBehaviors = function() -
FCKeditor/trunk/editor/_source/internals/fck_ie.js
r371 r400 77 77 } 78 78 79 function Doc_OnKeyDown()80 {81 if ( FCK.EditorWindow )82 {83 var e = FCK.EditorWindow.event ;84 85 if ( !( e.keyCode >=16 && e.keyCode <= 18 ) )86 Doc_OnKeyDownUndo() ;87 }88 return true ;89 }90 91 function Doc_OnKeyDownUndo()92 {93 if ( !FCKUndo.Typing )94 {95 FCKUndo.SaveUndoStep() ;96 FCKUndo.Typing = true ;97 FCK.Events.FireEvent( "OnSelectionChange" ) ;98 }99 100 FCKUndo.TypesCount++ ;101 102 if ( FCKUndo.TypesCount > FCKUndo.MaxTypes )103 {104 FCKUndo.TypesCount = 0 ;105 FCKUndo.SaveUndoStep() ;106 }107 }108 109 79 function Doc_OnDblClick() 110 80 { … … 137 107 window.FCKTabHTML += " " ; 138 108 } 139 this.EditorDocument.attachEvent("onkeydown", Doc_OnKeyDown) ;109 this.EditorDocument.attachEvent("onkeydown", FCK._KeyDownListener ) ; 140 110 141 111 this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ; -
FCKeditor/trunk/editor/_source/internals/fck.js
r398 r400 625 625 _InsertBlockElement : function( blockElement ) 626 626 { 627 }, 628 629 _IsFunctionKey : function(keyCode) 630 { 631 // keys that are captured but do not change editor contents 632 if (keyCode >= 16 && keyCode <= 20) 633 // shift, ctrl, alt, pause, capslock 634 return true; 635 if (keyCode == 27 || (keyCode >= 33 && keyCode <= 40)) 636 // esc, page up, page down, end, home, left, up, right, down 637 return true; 638 if (keyCode == 45) 639 // insert, no effect on FCKeditor, yet 640 return true; 641 return false; 642 }, 643 644 _KeyDownListener : function( evt ) 645 { 646 if (! evt) 647 evt = FCK.EditorWindow.event; 648 if ( FCK.EditorWindow ) 649 { 650 if ( !FCK._IsFunctionKey(evt.keyCode) // do not capture function key presses, like arrow keys or shift/alt/ctrl 651 && !(evt.ctrlKey || evt.metaKey) // do not capture Ctrl hotkeys, as they have their snapshot capture logic 652 && !(evt.keyCode == 46) ) // do not capture Del, it has its own capture logic in fckenterkey.js 653 FCK._KeyDownUndo(); 654 } 655 return true; 656 }, 657 658 _KeyDownUndo : function() 659 { 660 if ( !FCKUndo.Typing ) 661 { 662 FCKUndo.SaveUndoStep() ; 663 FCKUndo.Typing = true ; 664 FCK.Events.FireEvent( "OnSelectionChange" ) ; 665 } 666 667 FCKUndo.TypesCount++ ; 668 FCKUndo.Changed = 1; 669 670 if ( FCKUndo.TypesCount > FCKUndo.MaxTypes ) 671 { 672 FCKUndo.TypesCount = 0 ; 673 FCKUndo.SaveUndoStep() ; 674 } 627 675 } 628 676 } ; -
FCKeditor/trunk/_whatsnew.html
r388 r400 35 35 New Features and Improvements:</p> 36 36 <ul> 37 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/915">#915</a>] The undo/redo system has been 38 revamped to work the same across Internet Explorer and Gecko-based browsers (e.g. Firefox). A number 39 of critical bugs in the undo/redo system are also fixed.</li> 37 40 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/194">#194</a>] The editor 38 41 now uses the <strong>Data Processor</strong> technology, which makes it possible