Opened 11 years ago

Last modified 11 years ago

#2596 confirmed New Feature

Ctrl+Shift+Enter mode

Reported by: Shaun Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: 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 (1)

changes.txt (1.2 KB) - added by Shaun 11 years ago.
Changes to add Ctrl + Shift + Enter

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by Alfonso Martínez de Lizarrondo

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.

comment:2 Changed 11 years ago by Artur Formella

Keywords: Confirmed added

comment:3 Changed 11 years ago by Shaun

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 11 years ago by Shaun

Attachment: changes.txt added

Changes to add Ctrl + Shift + Enter

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy