mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
scroll padding widget only on text and code notes
This commit is contained in:
@@ -3,6 +3,10 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||
const TPL = `<div class="scroll-padding-widget"></div>`;
|
||||
|
||||
export default class ScrollPaddingWidget extends NoteContextAwareWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled() && ["text", "code"].includes(this.note?.type);
|
||||
}
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
|
||||
Reference in New Issue
Block a user