You are not logged in.
Pages: 1
is there a method to deactivate some shortcuts? or what else would you advise me to do?
Offline
At the moment there's no simple way to do that.
If you know some JavaScript you could do it by overwriting Xinha.prototype._shortCuts. This is the original function for a start. You can edit it to fit your needs and load the edited code at some point after XinhaCore.js
Xinha.prototype._shortCuts = function (ev)
{
var key = this.getKey(ev).toLowerCase();
var cmd = null;
var value = null;
switch (key)
{
// simple key commands follow
case 'b': cmd = "bold"; break;
case 'i': cmd = "italic"; break;
case 'u': cmd = "underline"; break;
case 's': cmd = "strikethrough"; break;
case 'l': cmd = "justifyleft"; break;
case 'e': cmd = "justifycenter"; break;
case 'r': cmd = "justifyright"; break;
case 'j': cmd = "justifyfull"; break;
case 'z': cmd = "undo"; break;
case 'y': cmd = "redo"; break;
case 'v': cmd = "paste"; break;
case 'n':
cmd = "formatblock";
value = "p";
break;
case '0': cmd = "killword"; break;
// headings
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
cmd = "formatblock";
value = "h" + key;
break;
}
if ( cmd )
{
// execute simple command
this.execCommand(cmd, false, value);
Xinha._stopEvent(ev);
}
};
Be aware, though, that this -- like any "hack" -- after an update could stop working and in any case hinders any improvements made in this function (which are actually likely to happen some time in the future, as the shortcut handling definitively is too unflexible)
Offline
ok. thank you very much
Offline
Pages: 1