Add visual CMS, media library and product directory
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use App\Content\View;
|
||||
use App\Content\Html;
|
||||
|
||||
$e = View::escape(...);
|
||||
?>
|
||||
@@ -12,11 +13,20 @@ $e = View::escape(...);
|
||||
<button type="button" data-insert="list">列表</button>
|
||||
<button type="button" data-insert="link">链接</button>
|
||||
</div>
|
||||
<button data-preview-button type="button" aria-controls="editor-preview" aria-expanded="false">预览正文</button>
|
||||
<?php if ($format === 'html'): ?>
|
||||
<button type="button" data-rich-media>插入媒体</button>
|
||||
<button type="button" data-source-toggle aria-pressed="false">HTML 源码</button>
|
||||
<?php else: ?>
|
||||
<button data-preview-button type="button" aria-controls="editor-preview" aria-expanded="false">预览正文</button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($format === 'html'): ?>
|
||||
<div class="rich studio-rich" contenteditable="true" role="textbox" aria-multiline="true" aria-label="可视化正文" data-rich-canvas hidden><?= Html::sanitize($body) ?></div>
|
||||
<p class="field-note" data-rich-status role="status" hidden></p>
|
||||
<?php endif ?>
|
||||
<textarea id="editor-text" name="body" rows="15" spellcheck="false"><?= $e($body) ?></textarea>
|
||||
<?php if ($format === 'html'): ?>
|
||||
<p class="field-note">支持段落、标题、链接、图片、列表、表格和折叠问答。保存时会清理脚本、内联样式等标签或属性。</p>
|
||||
<p class="field-note">可以直接编辑文字,插入链接、图片、音视频。复杂区块可切换到 HTML 源码调整。</p>
|
||||
<?php endif ?>
|
||||
<div class="editor-preview rich prose" id="editor-preview" aria-live="polite" hidden></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user