Preserve formatting on entering newline
Restoring behavior removed here: https://github.com/slab/quill/pull/3428
This commit is contained in:
parent
f6eeddde2d
commit
2a0bd6dda2
@ -350,6 +350,13 @@ class Keyboard extends Module<KeyboardOptions> {
|
||||
this.quill.updateContents(delta, Quill.sources.USER);
|
||||
this.quill.setSelection(range.index + 1, Quill.sources.SILENT);
|
||||
this.quill.focus();
|
||||
|
||||
Object.keys(context.format).forEach((name) => {
|
||||
if (lineFormats[name] != null) return;
|
||||
if (Array.isArray(context.format[name])) return;
|
||||
if (name === 'code' || name === 'link') return;
|
||||
this.quill.format(name, context.format[name], Quill.sources.USER);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user