Replace the plain textarea with a CodeMirror-based editor supporting syntax highlighting, formatting toolbar (bold, italic, lists, code blocks), and a live preview toggle. Update PostContentRenderer to handle new Markdown syntax (blockquotes, fenced code blocks). Add a preview endpoint for rendering content without saving.
31 lines
678 B
CSS
31 lines
678 B
CSS
.blog-markdown-editor .cm-editor {
|
|
border: 0;
|
|
border-radius: 0;
|
|
height: clamp(20rem, 55vh, 38rem);
|
|
color: var(--color-base-content);
|
|
background: var(--color-base-100);
|
|
}
|
|
|
|
.blog-markdown-editor .cm-editor.cm-focused {
|
|
outline: 0;
|
|
box-shadow: inset 0 0 0 2px var(--color-primary);
|
|
}
|
|
|
|
.blog-markdown-editor .cm-scroller {
|
|
min-height: 0;
|
|
font-family: var(--default-mono-font, monospace);
|
|
}
|
|
|
|
.blog-markdown-editor .cm-content {
|
|
padding: 1rem 0.75rem;
|
|
line-height: 1.65;
|
|
}
|
|
|
|
.blog-markdown-editor .cm-line {
|
|
padding-inline: 0.25rem;
|
|
}
|
|
|
|
.blog-markdown-editor .cm-activeLineGutter {
|
|
color: var(--color-primary);
|
|
font-weight: 600;
|
|
} |