You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there! Great project, the user experience is really good.
I have a small issue: when adding formatting (quote, title...etc) at the beginning of the text, it cannot be removed by pressing backspace key. See screencast below.
The text was updated successfully, but these errors were encountered:
I agree this is not great. I haven't had much time to work on this module and I don't use Quill in any active projects so I haven't had much need to fix this. If anybody would like to take a crack at it and submit a PR i can review and publish. I'll leave this issue open in case anybody wants to try.
I find a way to make this work, but from outside this markdown modules.
Register a keyboard module on quill modules like this:
modules: {
toolbar: {},
markdownShortcuts: {},
keyboard: {
bindings: {
custom: {
key: 'backspace',
format: ['blockquote', 'header'], // need to put all possibilities here
handler: function(range, context) {
if (context.offset === 0) {
// When backspace on the first character of a format,
// remove the format instead
this.quill.format(Object.keys(context.format)[0], false, Quill.sources.USER);
} else {
// Otherwise propagate to Quill's default
return true;
}
}
}
}
}
}
If I put that inside MarkdownShortcuts constructor using this.quill.keyboard.addBinding() it doesn't work.
Hey there! Great project, the user experience is really good.
I have a small issue: when adding formatting (quote, title...etc) at the beginning of the text, it cannot be removed by pressing
backspace
key. See screencast below.The text was updated successfully, but these errors were encountered: