disable enter key submission on grapesjs editor
This commit is contained in:
parent
7fa7d10b01
commit
75e3cf41f6
|
@ -139,6 +139,14 @@ const doInitEditor = () => {
|
|||
} catch (e) {
|
||||
editor.loadData({ html: '' })
|
||||
}
|
||||
|
||||
$(element).parents('form').keypress((e) => {
|
||||
if ($(e.target).parents('#' + id).length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (e.keyCode || e.which || e.charCode || 0) !== 13
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue