Skip to content

Build your personal knowledge base with Trilium Notes

fix(mermaid): diagram not updating

Elian Dorance5debd9bf45
diff --git a/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts b/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts
index c3cd63272e..3758229ea6 100644
--- a/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts
+++ b/apps/client/src/widgets/type_widgets/abstract_split_type_widget.ts
@@ -132,7 +132,14 @@ export default abstract class AbstractSplitTypeWidget extends TypeWidget {
super();
this.editorTypeWidget = new EditableCodeTypeWidget();
this.editorTypeWidget.isEnabled = () => true;
- this.editorTypeWidget.getExtraOpts = this.buildEditorExtraOptions;
+
+ const defaultOptions = this.editorTypeWidget.getExtraOpts();
+ this.editorTypeWidget.getExtraOpts = () => {
+ return {
+ ...defaultOptions,
+ ...this.buildEditorExtraOptions()
+ };
+ };
}
doRender(): void {