Hmm,
found a first solution by using JS/jQuery. Looks like this:
Code:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(document).bind('keypress', function(e){
if (e.which == 13) return false; // kills enter-key event, can be replaced by any key code
})
});
</script>
Has to be placed within the question text field as usual.
@Carsten Schmitz:
I'm wondering if it would'nt be very usefull to have an on field for JS code in the backend (in addition to the question-text and help-text fields)
There are some advantages for this:
1. clean and separated code / question text
2. code can be always visible to the editor (not only in sourcecode mode)
3. security and rights: eventually only dedicated persons can be allowed to see/edit js code
Any ideas for a better solution than mine above? (the disadvantage of this solution is: canceled keys are canceled for the whole question page or all questions if more than one is visible at the same time)
Any comments to the idea of an extra js-code field for the backend?
THX