Skip to content

Build your personal knowledge base with Trilium Notes

fix render type non-scrolling

zadamca0e36ea81c1
diff --git a/src/public/javascripts/widgets/type_widgets/book.js b/src/public/javascripts/widgets/type_widgets/book.js
index 159be7e7b9..b8ccd50103 100644
--- a/src/public/javascripts/widgets/type_widgets/book.js
+++ b/src/public/javascripts/widgets/type_widgets/book.js
@@ -49,7 +49,7 @@ const TPL = `
title="Zoom Out"></button>
</div>
- <div class="note-detail-book-help alert alert-warning">
+ <div class="note-detail-book-help alert alert-warning" style="margin: 50px; padding: 20px;">
This note of type Book doesn't have any child notes so there's nothing to display. See <a href="https://github.com/zadam/trilium/wiki/Book-note">wiki</a> for details.
</div>
diff --git a/src/public/javascripts/widgets/type_widgets/render.js b/src/public/javascripts/widgets/type_widgets/render.js
index 3051c17759..0317ac98e1 100644
--- a/src/public/javascripts/widgets/type_widgets/render.js
+++ b/src/public/javascripts/widgets/type_widgets/render.js
@@ -3,13 +3,19 @@ import TypeWidget from "./type_widget.js";
const TPL = `
<div class="note-detail-render note-detail-printable">
- <div class="note-detail-render-help alert alert-warning">
+ <style>
+ .note-detail-render {
+ height: 100%;
+ }
+ </style>
+
+ <div class="note-detail-render-help alert alert-warning" style="margin: 50px; padding: 20px;">
<p><strong>This help note is shown because this note of type Render HTML doesn't have required relation to function properly.</strong></p>
<p>Render HTML note type is used for <a href="https://github.com/zadam/trilium/wiki/Scripts">scripting</a>. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a relation (in <a class="show-attributes-button">Attributes dialog</a>) called "renderNote" pointing to the HTML note to render. Once that's defined you can click on the "play" button to render.</p>
</div>
- <div class="note-detail-render-content"></div>
+ <div class="note-detail-render-content" style="height: 100%; overflow: auto;"></div>
</div>`;
export default class RenderTypeWidget extends TypeWidget {
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 4066eea515..e65b60a587 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -310,12 +310,6 @@ div.ui-tooltip {
background-color: var(--active-item-background-color) !important;
}
-
-
-.note-detail-render {
- min-height: 500px;
-}
-
.CodeMirror {
font-family: "Liberation Mono", "Lucida Console", monospace;
height: auto;
@@ -456,11 +450,6 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
padding: 10px;
}
-.note-detail-render-help, .note-detail-book-help {
- margin: 50px;
- padding: 20px;
-}
-
.tooltip {
font-size: var(--main-font-size) !important;
}