Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
disable entering new line in the attribute editor
zadam6b41c26d2b31
diff --git a/src/public/app/widgets/attribute_widgets/attribute_editor.js b/src/public/app/widgets/attribute_widgets/attribute_editor.jsindex e04627586c..18a1ccfa5a 100644--- a/src/public/app/widgets/attribute_widgets/attribute_editor.js+++ b/src/public/app/widgets/attribute_widgets/attribute_editor.js@@ -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 editorthis.textEditor.editing.view.change(writer => writer.setAttribute('spellcheck', 'false', this.textEditor.editing.view.document.getRoot()));