add wisiwig editor TinyMCE. default content type = markdown.

This commit is contained in:
2025-11-24 11:53:56 +08:00
parent d97e4d4944
commit d7fe90a615
27 changed files with 5676 additions and 5055 deletions
+8 -2
View File
@@ -7,9 +7,15 @@ $Parsedown = new ParsedownExtra();;
$content = $_POST['content'] ?? '';
$title = $_POST['title'] ?? 'Предпросмотр';
$editor_type = $_POST['editor_type'] ?? 'markdown'; // Новое поле
// Обрабатываем контент в зависимости от типа редактора
if ($editor_type == 'markdown') {
$html_content = $Parsedown->text($content);
} else {
$html_content = $content;
}
$Parsedown = new Parsedown();
$html_content = $Parsedown->text($content);
$page_title = "Предпросмотр: " . e($title);
?>