Ticket #2596 (new New Feature)

Opened 8 weeks ago

Last modified 7 weeks ago

Ctrl+Shift+Enter mode

Reported by: simshaun Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Confirmed Cc:

Description

It would be awesome if FCKEditor came with a third mode for Ctrl + Shift + Enter.

I have recently encountered a situation where I needed to use all the choices (p, br, and div tags).

With a little bit of modification it is easily done (I just did it.) I'd prefer to not have to do it again when I upgrade though.

It works in FireFox 3, IE6, and IE7 that I have tested.

Attachments

changes.txt (1.2 KB) - added by simshaun 7 weeks ago.
Changes to add Ctrl + Shift + Enter

Change History

Changed 8 weeks ago by alfonsoml

I guess that you could provide the code that you have used if you want it fixed.

Creating the code again it's harder than doing a review of existing code.

Changed 8 weeks ago by arczi

  • keywords Confirmed added

Changed 7 weeks ago by simshaun

Well I'm new to this whole feature request thing, so I'm not sure if I should be attaching all this or not, so I'll just list what I did.

This is more of a summary of what I added. Anyone who does a bit of programming should be able to look through the JavaScript and figure out where it goes.

Added to fckeditorcode_gecko.js

var FCKEnterKey

  • F paramater
  • CtrlShiftEnter keystroke
  • case 'CtrlShiftEnter':return C.DoCtrlShiftEnter();break;
  • FCKEnterKey.prototype.DoCtrlShiftEnter=function(){return this.DoEnter(this.CtrlShiftEnterMode,true);};

Added to fckeditorcode_ie.js

var FCKEnterKey

  • F paramater
  • CtrlShiftEnter keystroke
  • case 'CtrlShiftEnter':return C.DoCtrlShiftEnter();break;
  • FCKEnterKey.prototype.DoCtrlShiftEnter=function(){return this.DoEnter(this.CtrlShiftEnterMode,true);};

Added to fckenterkey.js

FCKEnterKey

  • parameter ctrlShiftEnterMode
this.CtrlShiftEnterMode = ctrlShiftEnterMode 'div' ;
  • [ CTRL + SHIFT + 13, 'CtrlShiftEnter' ],

FCKEnterKey_OnKeystroke

  • case 'CtrlShiftEnter' :

return oEnterKey.DoCtrlShiftEnter() ; break ;

/*

  • Executes the <Ctrl>+<Shift>+<Enter> key behavior. */ FCKEnterKey.prototype.DoCtrlShiftEnter = function() {

return this.DoEnter( this.CtrlShiftEnterMode, true ) ;

}

Added to fckconfig.js

FCKConfig.CtrlShiftEnterMode = 'div' ; // p | div | br

Changed 7 weeks ago by simshaun

Changes to add Ctrl + Shift + Enter

Note: See TracTickets for help on using tickets.