jakiestfu / Medium.js

A tiny JavaScript library for making contenteditable beautiful (Like Medium's editor)

Home Page:http://jakiestfu.github.io/Medium.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent event

pavelivanov opened this issue · comments

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..

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.