Format slide texts in WhatsApp style
Slide descriptions support *bold*, _italic_, ~strikethrough~ and lists with "- " or "* " at the start of a line. FormatHelper renders them for the participant page and the PDF (escaping everything else), Format in plenario.js builds the same DOM for presenter and embed. Participant input stays plain text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3465f69bfc
commit
8d3d8d4341
12 files changed
+215
-8
No files matched your search
@@ -66,7 +66,7 @@ $countdown = function (?int $remaining): string {
|
||||
<p class="eyebrow"><?= __('Video') ?></p>
|
||||
<h1><?= h($slide->question) ?></h1>
|
||||
<?php if ($slide->description) : ?>
|
||||
<div class="prose"><?= nl2br(h($slide->description)) ?></div>
|
||||
<div class="prose formatted"><?= $this->Format->text($slide->description) ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($watchUrl !== null) : ?>
|
||||
<p class="video-link">
|
||||
@@ -87,7 +87,7 @@ $countdown = function (?int $remaining): string {
|
||||
<section class="card">
|
||||
<h1><?= h($slide->question) ?></h1>
|
||||
<?php if ($slide->description) : ?>
|
||||
<div class="prose"><?= nl2br(h($slide->description)) ?></div>
|
||||
<div class="prose formatted"><?= $this->Format->text($slide->description) ?></div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
@@ -95,7 +95,7 @@ $countdown = function (?int $remaining): string {
|
||||
<section class="card">
|
||||
<h1 class="question"><?= h($slide->question) ?></h1>
|
||||
<?php if ($slide->description) : ?>
|
||||
<p class="muted"><?= nl2br(h($slide->description)) ?></p>
|
||||
<div class="muted formatted"><?= $this->Format->text($slide->description) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($quiz !== null) : ?>
|
||||
|
||||
Reference in new issue
Block a user