Done. All three changes have been applied: (#1432)

1. Added `text-sm` to the container wrapper (line 190)
2. Removed redundant `text-sm` from the `paragraph` theme (line 102)
3. Removed redundant `text-sm` from the `code` theme (line 129)

Now all markdown elements in the WYSIWYG editor will inherit `text-sm` from the container, ensuring consistent font sizing for paragraphs, lists, blockquotes, and other elements.
This commit is contained in:
Louis Knight-Webb
2025-12-04 17:27:10 +00:00
committed by GitHub
parent 92a65b4e0e
commit 58aecc0377

View File

@@ -99,7 +99,7 @@ function WYSIWYGEditor({
namespace: 'md-wysiwyg',
onError: console.error,
theme: {
paragraph: 'mb-2 last:mb-0 text-sm',
paragraph: 'mb-2 last:mb-0',
heading: {
h1: 'mt-4 mb-2 text-2xl font-semibold',
h2: 'mt-3 mb-2 text-xl font-semibold',
@@ -126,7 +126,7 @@ function WYSIWYGEditor({
strikethrough: 'line-through',
code: 'font-mono bg-muted px-1 py-0.5 rounded',
},
code: 'block font-mono text-sm bg-secondary rounded-md px-3 py-2 my-2 whitespace-pre overflow-x-auto',
code: 'block font-mono bg-secondary rounded-md px-3 py-2 my-2 whitespace-pre overflow-x-auto',
codeHighlight: CODE_HIGHLIGHT_CLASSES,
},
nodes: [
@@ -187,7 +187,7 @@ function WYSIWYGEditor({
);
const editorContent = (
<div className="wysiwyg">
<div className="wysiwyg text-sm">
<TaskAttemptContext.Provider value={taskAttemptId}>
<TaskContext.Provider value={taskId}>
<LocalImagesContext.Provider value={localImages ?? []}>