Files
plugi/extensions/plugi-ext-blog/extension.php
T
deepDiverPaul 2d4b196b04 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.
2026-12-02 10:20:36 +00:00

22 lines
699 B
PHP

<?php
use Plugi\Extensions;
Extensions::addRoutes([
'/ext--blog/save-post' => __DIR__ . '/routes/savePost.php',
'/ext--blog/preview-post' => __DIR__ . '/routes/previewPost.php',
'/ext--blog/delete-post' => __DIR__ . '/routes/deletePost.php',
'/ext--blog/save-category' => __DIR__ . '/routes/saveCategory.php',
'/ext--blog/delete-category' => __DIR__ . '/routes/deleteCategory.php',
]);
Extensions::addBlocks([
'post-list' => __DIR__ . '/blocks/post-list',
'post-detail' => __DIR__ . '/blocks/post-detail',
]);
Extensions::registerBackend('blog', [
'title' => 'Blog',
'include' => __DIR__ . '/admin/blog.php',
'icon' => '<i class="ph ph-article"></i>',
]);