Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: when rich editor is enabled markdown is in monospace (#32097)

Sam18433c45b9a2
diff --git a/app/assets/javascripts/discourse/app/components/d-editor.gjs b/app/assets/javascripts/discourse/app/components/d-editor.gjs
index f685474bbed..f9b2c9f31da 100644
--- a/app/assets/javascripts/discourse/app/components/d-editor.gjs
+++ b/app/assets/javascripts/discourse/app/components/d-editor.gjs
@@ -730,7 +730,13 @@ export default class DEditor extends Component {
}
<template>
- <div class="d-editor-container">
+ <div
+ class="d-editor-container
+ {{if
+ this.siteSettings.rich_editor
+ 'd-editor-container--rich-editor-enabled'
+ }}"
+ >
<div class="d-editor-textarea-column">
{{yield}}
diff --git a/app/assets/stylesheets/common/d-editor.scss b/app/assets/stylesheets/common/d-editor.scss
index 0d29340b93a..5e44e8ba990 100644
--- a/app/assets/stylesheets/common/d-editor.scss
+++ b/app/assets/stylesheets/common/d-editor.scss
@@ -2,6 +2,10 @@
display: flex;
flex-grow: 1;
max-width: 100%;
+
+ &--rich-editor-enabled .d-editor-textarea-wrapper textarea.d-editor-input {
+ font-family: var(--d-font-family--monospace);
+ }
}
.d-editor {