From 58cd736ab904cda0ae4e9dabe90e7bb524acedf9 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 28 Aug 2022 20:47:43 +0300 Subject: [PATCH] wysiwyg fallback radius --- client/res/templates/fields/wysiwyg/detail.tpl | 2 +- client/src/views/fields/wysiwyg.js | 4 ++++ frontend/less/espo/custom.less | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/res/templates/fields/wysiwyg/detail.tpl b/client/res/templates/fields/wysiwyg/detail.tpl index 6487905208..5a5cf2f5f0 100644 --- a/client/res/templates/fields/wysiwyg/detail.tpl +++ b/client/res/templates/fields/wysiwyg/detail.tpl @@ -1,6 +1,6 @@ {{#unless isPlain}} {{#if useIframe}} - + {{else}}
{{{value}}}
{{/if}} diff --git a/client/src/views/fields/wysiwyg.js b/client/src/views/fields/wysiwyg.js index e9d2248a29..75bf4739c7 100644 --- a/client/src/views/fields/wysiwyg.js +++ b/client/src/views/fields/wysiwyg.js @@ -307,6 +307,10 @@ define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], function let useFallbackStylesheet = this.getThemeManager().getParam('isDark') && this.htmlHasColors(body); + useFallbackStylesheet ? + $iframe.addClass('fallback') : + $iframe.removeClass('fallback'); + var linkElement = iframeElement.contentWindow.document.createElement('link'); linkElement.type = 'text/css'; diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less index bd5473ea81..e272997ace 100644 --- a/frontend/less/espo/custom.less +++ b/frontend/less/espo/custom.less @@ -3313,6 +3313,10 @@ a.close:hover { scrollbar-width: thin; } +iframe.wysiwyg.fallback { + border-radius: var(--border-radius); +} + * { scrollbar-width: auto; scrollbar-color: var(--scroll-thumb-bg) var(--scroll-bg);