feat(ext-blog): Add rich Markdown editor for blog posts
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.
This commit is contained in:
@@ -20,6 +20,6 @@ Keep `/blog` and `/blog/{slug}` unique among the site’s page routes.
|
||||
|
||||
## Authoring content and images
|
||||
|
||||
Write post bodies in Markdown. The detail page supports headings, paragraphs and line breaks, bold and italic text, inline code, links, and ordered or unordered lists. Raw HTML is displayed as text; links only render with relative URLs or `http`, `https`, and `mailto` schemes.
|
||||
Write post bodies in Markdown using the syntax-highlighted source editor. Its toolbar inserts bold, italic, headings, links, unordered and ordered lists, blockquotes, horizontal rules, inline code, and fenced code blocks; the live preview uses the same server-side renderer as the public detail page. If JavaScript is unavailable, the source textarea remains usable and can still save the post. The detail page supports headings, paragraphs and line breaks, bold and italic text, inline code, links, ordered and unordered lists, blockquotes, horizontal rules, and fenced code blocks. Code-block contents are displayed as escaped text. Raw HTML is displayed as text; links only render with relative URLs or `http`, `https`, and `mailto` schemes.
|
||||
|
||||
Choose a featured image from the existing Website Manager media library to show it on post cards and detail pages. Use the editor’s inline-image selector to insert Markdown image syntax at the body cursor; image alt text comes from the selected media item. Inline images render only with relative, `http`, or `https` sources. Unsafe link and image protocols are not rendered.
|
||||
Reference in New Issue
Block a user