mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
chore(code): reintroduce line wrapping
This commit is contained in:
@@ -8,6 +8,7 @@ type ContentChangedListener = () => void;
|
||||
|
||||
export interface EditorConfig extends EditorViewConfig {
|
||||
placeholder?: string;
|
||||
lineWrapping?: boolean;
|
||||
onContentChanged?: ContentChangedListener;
|
||||
}
|
||||
|
||||
@@ -37,6 +38,10 @@ export default class CodeMirror extends EditorView {
|
||||
extensions.push(placeholder(config.placeholder));
|
||||
}
|
||||
|
||||
if (config.lineWrapping) {
|
||||
extensions.push(EditorView.lineWrapping);
|
||||
}
|
||||
|
||||
if (config.onContentChanged) {
|
||||
extensions.push(EditorView.updateListener.of((v) => this.#onDocumentUpdated(v)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user