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);