Skip to content

Build your personal knowledge base with Trilium Notes

fix include note sizing when in readonly mode, closes #4135

zadam9166765ced2f
diff --git a/src/public/app/services/note_autocomplete.js b/src/public/app/services/note_autocomplete.js
index c27ae85d20..526bc6dce6 100644
--- a/src/public/app/services/note_autocomplete.js
+++ b/src/public/app/services/note_autocomplete.js
@@ -259,8 +259,6 @@ function init() {
};
$.fn.setSelectedExternalLink = function (externalLink) {
- console.trace("setSelectedExternalLink");
-
if (externalLink) {
$(this)
.closest(".input-group")
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 63f7863f26..0e44518c87 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -722,25 +722,26 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
content: '' !important;
}
-.include-note.box-size-small .include-note-content {
+/* Using data- attribute to support both CKEditor and readonly view */
+.include-note[data-box-size=small] .include-note-content {
max-height: 10em;
overflow: auto;
}
-.include-note.box-size-small .include-note-content.type-pdf {
+.include-note[data-box-size=small] .include-note-content.type-pdf {
height: 10em; /* PDF is rendered in iframe and must be sized absolutely */
}
-.include-note.box-size-medium .include-note-content {
+.include-note[data-box-size=medium] .include-note-content {
max-height: 20em;
overflow: auto;
}
-.include-note.box-size-medium .include-note-content.type-pdf .rendered-content {
+.include-note[data-box-size=medium] .include-note-content.type-pdf .rendered-content {
height: 20em; /* PDF is rendered in iframe and must be sized absolutely */
}
-.include-note.box-size-full .include-note-content.type-pdf .rendered-content {
+.include-note[data-box-size=full] .include-note-content.type-pdf .rendered-content {
height: 50em; /* PDF is rendered in iframe and it's not possible to put full height so at least a large height */
}