mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
disable entering new line in the attribute editor
This commit is contained in:
parent
463071ea4d
commit
6b41c26d2b
@ -338,6 +338,11 @@ export default class AttributeEditorWidget extends TabAwareWidget {
|
||||
|
||||
this.textEditor = await BalloonEditor.create(this.$editor[0], editorConfig);
|
||||
this.textEditor.model.document.on('change:data', () => this.dataChanged());
|
||||
this.textEditor.editing.view.document.on('enter', (event, data) => {
|
||||
// disable entering new line - see https://github.com/ckeditor/ckeditor5/issues/9422
|
||||
data.preventDefault();
|
||||
event.stop();
|
||||
}, {priority: 'high'});
|
||||
|
||||
// disable spellcheck for attribute editor
|
||||
this.textEditor.editing.view.change(writer => writer.setAttribute('spellcheck', 'false', this.textEditor.editing.view.document.getRoot()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user