jakiestfu / Medium.js

A tiny JavaScript library for making contenteditable beautiful (Like Medium's editor)
http://jakiestfu.github.io/Medium.js/
4.39k stars 404 forks source link

Prevent event #165

Open pavelivanov opened 9 years ago

pavelivanov commented 9 years ago

Hi, I'm trying to prevent pressing 'enter'. Here is what I'm doing:

keyContext: {
    enter: function(event) {
        event.preventDefault();
        return false;
    }
}

As I understand from docs I need 'return false;' only. But it doesn't work for me..

ShirajG commented 7 years ago

Are you trying to do this on an instance where the mode in 'inline'? I can't get it to work unless the mode is no inline.