Switch to useing markdown for user formatted text

This commit is contained in:
2018-08-12 03:52:55 +02:00
parent 307eba4218
commit 79e413d194
17 changed files with 120 additions and 47 deletions

View File

@@ -99,7 +99,7 @@ else {
</div>
</div>
<p class="subtitle">Beskrivelse</p>
<p class="subtitle">Beskrivelse (<i>markdown</i>)</p>
<textarea name="desc" rows="8" class="boxinput" placeholder="Beskrivese" required><?= implode($event->getDescription(), "\n"); ?></textarea>

View File

@@ -95,7 +95,10 @@ $events = array_values(array_filter(
<p class="subnote">
<?= $event->getStart()->format("(Y-m-d H:i:s)") . " - " . $event->getStop()->format("(Y-m-d H:i:s)"); ?>
</p>
<p><?= implode($event->getDescription(), "<br>"); ?></p>
<?php
$Parsedown = new \Parsedown();
echo $Parsedown->text(implode("\n", $event->getDescription()));
?>
</div>
<div class="event-actions">