Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-08-19 20:47:45

InGuN
New member
Registered: 2007-08-19
Posts: 1

About the Shift + Enter behaviour

Hello all !

First thanks a lot for Xinha, good job, I'm using it right now !

I've been quite surprised while reading the FAQ :

How to insert a <br> tag ?
Use Shift+Enter
To change the behaviour of unshifted enter, in Mozilla set xinha_config.mozParaHandler = "built-in". In IE there is now way to change this.

There ARE various ways to get rid of the default behaviour in Internet Explorer.  At least, you could have mentioned the P margin trick in the FAQ... Needless to say FCKEditor and probably others have already implemented a solution for that...

Well, I've searched for solutions 3 years ago, and the best trick I've tested is this one (100% working to my knowledge) :

You can modify the source if you want to test it :
on line 34 of /modules/InternetExplorer/InternetExplorer.js add :

case 13 :
var hackSel=document.selection.createRange();//this needs something better
hackSel.pasteHTML("<br />");
ev.cancelBubble=true;
ev.returnValue=false;
hackSel.select();
hackSel.moveEnd("character", 1);
hackSel.moveStart("character", 1);
hackSel.collapse(false);
break;

Hope this helps !

Greetings to Xinha and all smile
InGuN


Edit : should this belong to the ticket system ?

Last edited by InGuN (2007-08-19 21:04:51)

Offline

#2 2008-04-22 11:19:40

DizzyNeon
New member
Registered: 2008-04-22
Posts: 1

Re: About the Shift + Enter behaviour

Works great!
Thanks alot!

Offline

Board footer

Powered by FluxBB