From aea81c9872ca857d17a3c4586b443c7a39d60741 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 29 Jan 2021 20:09:03 +0100 Subject: [PATCH 1/2] fix include note rendering over floating elements, #1590 --- src/public/stylesheets/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 31ab8d0d7..01d83e031 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -703,6 +703,7 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href padding: 10px; border-radius: 10px; background-color: var(--accented-background-color); + clear: both; } .include-note.ck-placeholder::before { /* remove placeholder in otherwise empty note */ From ba33a0d330dc732f0f2e33361f9c1ee721ce69b1 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 29 Jan 2021 20:27:16 +0100 Subject: [PATCH 2/2] fix conflict between CKEditor build content style and externally provided content style (which are not needed when build CSS is available), #1590 --- src/public/app/widgets/type_widgets/read_only_text.js | 5 +++++ src/views/desktop.ejs | 2 -- src/views/mobile.ejs | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/public/app/widgets/type_widgets/read_only_text.js b/src/public/app/widgets/type_widgets/read_only_text.js index e3a5c925d..a6304f7f4 100644 --- a/src/public/app/widgets/type_widgets/read_only_text.js +++ b/src/public/app/widgets/type_widgets/read_only_text.js @@ -67,6 +67,11 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget { } async doRefresh(note) { + // we load CKEditor also for read only notes because they contain content styles required for correct rendering of even read only notes + // we could load just ckeditor-content.css but that causes CSS conflicts when both build CSS and this content CSS is loaded at the same time + // (see https://github.com/zadam/trilium/issues/1590 for example of such conflict) + await libraryLoader.requireLibrary(libraryLoader.CKEDITOR); + const noteComplement = await treeCache.getNoteComplement(note.noteId); this.$content.html(noteComplement.content); diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index ef399712f..631c9ff2a 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -63,8 +63,6 @@ - - diff --git a/src/views/mobile.ejs b/src/views/mobile.ejs index 85e6797b7..e07b2975f 100644 --- a/src/views/mobile.ejs +++ b/src/views/mobile.ejs @@ -127,8 +127,6 @@ - -