From cf79b24dc3bfe56c60322739fe6645f241f1af63 Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Tue, 9 Jun 2026 22:28:28 +0100 Subject: [PATCH] fix: restore list markers in lesson editor to match saved prose output Tailwind's list-style reset stripped bullets and numbers while editing. Mirror dashboard prose list styles in the editor CSS instead. --- packages/ui/src/custom/editor/editor.css | 20 +++++++++++++++++--- packages/ui/src/custom/editor/editor.ts | 10 ---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/ui/src/custom/editor/editor.css b/packages/ui/src/custom/editor/editor.css index 617f2aeb..7d85abb7 100644 --- a/packages/ui/src/custom/editor/editor.css +++ b/packages/ui/src/custom/editor/editor.css @@ -102,12 +102,26 @@ font-weight: bold; } -/* List Styling */ +/* List Styling — mirror dashboard `.prose` list rules so editor matches saved output */ .tiptap ul, .tiptap ol { - padding: 0 1rem; - margin: 0.5rem 1rem 0.5rem 0.4rem; + margin-block: 1.5rem; + margin-inline-start: 1.5rem; + padding: 0; +} + +.tiptap ul:not([data-type='taskList']) { + list-style-type: disc; +} + +.tiptap ol { + list-style-type: decimal; +} + +.tiptap ul li, +.tiptap ol li { + margin-top: 0.5rem; } .tiptap ul li p, diff --git a/packages/ui/src/custom/editor/editor.ts b/packages/ui/src/custom/editor/editor.ts index 63b2ec45..81569df4 100644 --- a/packages/ui/src/custom/editor/editor.ts +++ b/packages/ui/src/custom/editor/editor.ts @@ -31,16 +31,6 @@ export default ( content, extensions: [ StarterKit.configure({ - orderedList: { - HTMLAttributes: { - class: 'list-decimal' - } - }, - bulletList: { - HTMLAttributes: { - class: 'list-disc' - } - }, heading: { levels: [1, 2, 3, 4] },