From f30da19d01188293b3d2c1bee5fb7b40b578a8cf Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Mon, 30 Oct 2023 09:23:37 +0100 Subject: [PATCH] The content is generated in the BE and showed in the div tag instead of iframe. --- .../file-description/file-description.component.html | 3 +-- .../file-description/file-description.component.ts | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html index 640c1487eb1..6d1221325fd 100644 --- a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html +++ b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html @@ -69,8 +69,7 @@
{{ fileInput.fileInfo[0]?.content }}
- +
diff --git a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.ts b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.ts index 68dd27f4dab..ea80ee1c452 100644 --- a/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.ts +++ b/src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.ts @@ -23,11 +23,15 @@ export class FileDescriptionComponent { return this.fileInput?.format === 'text/plain'; } + public isHtml() { + return this.fileInput?.format === 'text/html'; + } + /** * Show scrollbar in the `.txt` preview, but it should be hidden in the other formats. */ public dynamicOverflow() { - return this.isTxt() ? 'overflow: scroll' : 'overflow: hidden'; + return (this.isTxt() || this.isHtml()) ? 'overflow: scroll' : 'overflow: hidden'; } /**