From f9e406635219ba33e9e84db594c4578e93fc4e2f Mon Sep 17 00:00:00 2001 From: Matthias Grief Date: Mon, 23 Dec 2024 15:00:06 +0100 Subject: [PATCH] Editoren erweitert --- webseite/classes/TopicData.php | 3 -- webseite/subjectEditor.php | 67 ++++++++++++++++++++++------------ webseite/topicEditor.php | 45 ++++++++++++++--------- 3 files changed, 71 insertions(+), 44 deletions(-) diff --git a/webseite/classes/TopicData.php b/webseite/classes/TopicData.php index fd3de5f..c157c0d 100644 --- a/webseite/classes/TopicData.php +++ b/webseite/classes/TopicData.php @@ -514,9 +514,6 @@ class TopicData public function getFinishedArticle(): string { $a = str_replace('$TOPICPATH', Config::getTopicDirectory($this->subjectId, $this->id) . "images", $this->article); - $a = str_replace("\r\n", "
", $a); - $a = str_replace("\r", "
", $a); - $a = str_replace("\n", "
", $a); return $a; } diff --git a/webseite/subjectEditor.php b/webseite/subjectEditor.php index c3b6a01..45d6296 100644 --- a/webseite/subjectEditor.php +++ b/webseite/subjectEditor.php @@ -28,6 +28,7 @@ if (isset($_GET['subjectId'])) { +
@@ -38,7 +39,7 @@ if (isset($_GET['subjectId'])) { class="w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-lg enabled:hover:border-gray-400" placeholder="z.B. Mathematik" value="getDisplayName(); } ?>"> @@ -51,7 +52,7 @@ if (isset($_GET['subjectId'])) { class="w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-lg enabled:hover:border-gray-400" rows="4" placeholder="Kurze Beschreibung des Fachs">getDescription(); } ?> @@ -62,7 +63,7 @@ if (isset($_GET['subjectId'])) { [$icon, $label]) { + foreach ($icons as $icon) { echo "
-
$label
"; } ?> @@ -120,5 +119,27 @@ if (isset($_GET['subjectId'])) {
+ + diff --git a/webseite/topicEditor.php b/webseite/topicEditor.php index 5e6aeaf..bf9ee4a 100644 --- a/webseite/topicEditor.php +++ b/webseite/topicEditor.php @@ -34,8 +34,9 @@ if (isset($_GET['subjectId']) && isset($_GET['topicId'])) { +
-
+
@@ -50,7 +51,8 @@ if (isset($_GET['subjectId']) && isset($_GET['topicId'])) {
-
- +