when a user is in the atto editor and clicks "Enter" on keyboard, it creates a "<p>" tag.
I would like it to create a "<br>" tag instead.
how can that be done ?
and I know CTRL+Enter does it but I want "Enter" to do it too.
i'm using moodle 2.7
Shift + Enter is how I do this. Same in Microsoft Word. I have not heard of customizing keyboard shortcuts in Moodle.
yes, i know "shift+enter" does it but i want it to be done with "Enter"
there must be somewhere in the code to do it.
You may look in lib/editor/atto/yui/src/editor/js/editor.js and change the line
document.execCommand('DefaultParagraphSeparator', false, 'p');
to use br tag. You will need to run shifter after you make the change. I do not know whether this is supported in all browsers.
Thanks Daniel. Neat to know this can be done.
I am not sure exactly whether this addresses the problem. This may be a browser issue (perhaps Safari). I think that Safari has different behavior with regard to shift enter. Safari changes enter to BR normally while other on browsers it inputs a P. Changing this code will result in all users entering BR on enter, not just those on Safari.