Skip to content

Build your personal knowledge base with Trilium Notes

client: Fix content size for code editor

Elian Doran70ebf1a08f6d
diff --git a/src/public/app/widgets/type_widgets/editable_code.js b/src/public/app/widgets/type_widgets/editable_code.js
index 452fbbf9b9..a62f3fafbb 100644
--- a/src/public/app/widgets/type_widgets/editable_code.js
+++ b/src/public/app/widgets/type_widgets/editable_code.js
@@ -25,6 +25,7 @@ export default class EditableCodeTypeWidget extends AbstractCodeTypeWidget {
doRender() {
this.$widget = $(TPL);
+ this.contentSized();
this.$editor = this.$widget.find('.note-detail-code-editor');
keyboardActionService.setupActionsForElement('code-detail', this.$widget, this);
diff --git a/src/public/app/widgets/type_widgets/read_only_code.js b/src/public/app/widgets/type_widgets/read_only_code.js
index 4cc2fb5e12..72e2e05e5f 100644
--- a/src/public/app/widgets/type_widgets/read_only_code.js
+++ b/src/public/app/widgets/type_widgets/read_only_code.js
@@ -21,6 +21,7 @@ export default class ReadOnlyCodeTypeWidget extends AbstractCodeTypeWidget {
doRender() {
this.$widget = $(TPL);
+ this.contentSized();
this.$editor = this.$widget.find('.note-detail-readonly-code-content');
super.doRender();