continue
This commit is contained in:
Regular → Executable
+5
-33
@@ -27,36 +27,9 @@ include 'views/layouts/header.php';
|
||||
<label for="content" style="display: block; margin-bottom: 0.5rem; font-weight: bold;">
|
||||
Содержание главы *
|
||||
</label>
|
||||
|
||||
<?php if (($book['editor_type'] ?? 'markdown') == 'html'): ?>
|
||||
<textarea id="content" name="content" class="html-editor"
|
||||
placeholder="Начните писать вашу главу..."
|
||||
rows="20"
|
||||
style="width: 100%;"><?= e($_POST['content'] ?? '') ?></textarea>
|
||||
<?php else: ?>
|
||||
<div style="margin-bottom: 1rem; padding: 0.5rem; background: var(--card-background-color); border-radius: 5px;">
|
||||
<div style="display: flex; gap: 3px; flex-wrap: nowrap; overflow-x: auto; padding: 5px 0;">
|
||||
<button type="button" onclick="insertMarkdown('**')" class="compact-button secondary" title="Жирный текст" style="white-space: nowrap; flex-shrink: 0;">**B**</button>
|
||||
<button type="button" onclick="insertMarkdown('*')" class="compact-button secondary" title="Курсив" style="white-space: nowrap; flex-shrink: 0;">*I*</button>
|
||||
<button type="button" onclick="insertMarkdown('~~')" class="compact-button secondary" title="Зачеркнутый" style="white-space: nowrap; flex-shrink: 0;">~~S~~</button>
|
||||
<button type="button" onclick="insertMarkdown('`')" class="compact-button secondary" title="Код" style="white-space: nowrap; flex-shrink: 0;">`code`</button>
|
||||
<button type="button" onclick="insertMarkdown('\n\n- ')" class="compact-button secondary" title="Список" style="white-space: nowrap; flex-shrink: 0;">- список</button>
|
||||
<button type="button" onclick="insertMarkdown('\n\n> ')" class="compact-button secondary" title="Цитата" style="white-space: nowrap; flex-shrink: 0;">> цитата</button>
|
||||
<button type="button" onclick="insertMarkdown('\n\n# ')" class="compact-button secondary" title="Заголовок" style="white-space: nowrap; flex-shrink: 0;"># Заголовок</button>
|
||||
<button type="button" onclick="insertMarkdown('\n— ')" class="compact-button secondary" title="Диалог" style="white-space: nowrap; flex-shrink: 0;">— диалог</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<textarea id="content" name="content"
|
||||
placeholder="Начните писать вашу главу... Поддерживается Markdown разметка."
|
||||
rows="20"
|
||||
style="width: 100%; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 14px; line-height: 1.5;"><?= e($_POST['content'] ?? '') ?></textarea>
|
||||
|
||||
<div style="margin-top: 0.5rem; font-size: 0.9em; color: var(--muted-color);">
|
||||
<strong>Подсказка:</strong> Используйте Markdown для форматирования.
|
||||
<a href="https://commonmark.org/help/" target="_blank">Справка по Markdown</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<textarea id="content" name="content" class="writer-editor" style="display: none;">
|
||||
<?= e($_POST['content'] ?? '') ?>
|
||||
</textarea>
|
||||
|
||||
<div style="margin-top: 1rem;">
|
||||
<label for="status" style="display: block; margin-bottom: 0.5rem; font-weight: bold;">
|
||||
@@ -86,7 +59,7 @@ include 'views/layouts/header.php';
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<link href="/assets/css/quill_reset.css" rel="stylesheet">
|
||||
<script>
|
||||
function previewChapter() {
|
||||
const form = document.getElementById('chapter-form');
|
||||
@@ -128,7 +101,6 @@ function previewChapter() {
|
||||
document.body.removeChild(tempForm);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/markdown-editor.js"></script>
|
||||
<script src="/assets/js/editor.js"></script>
|
||||
<script src="/assets/js/autosave.js"></script>
|
||||
<?php include 'views/layouts/footer.php'; ?>
|
||||
Regular → Executable
+5
-18
@@ -27,23 +27,10 @@ include 'views/layouts/header.php';
|
||||
<label for="content" style="display: block; margin-bottom: 0.5rem; font-weight: bold;">
|
||||
Содержание главы *
|
||||
</label>
|
||||
|
||||
<?php if (($book['editor_type'] ?? 'markdown') == 'html'): ?>
|
||||
<textarea id="content" name="content" class="html-editor"
|
||||
placeholder="Начните писать вашу главу..."
|
||||
rows="20"
|
||||
style="width: 100%;"><?= e($chapter['content']) ?></textarea>
|
||||
<?php else: ?>
|
||||
<textarea id="content" name="content"
|
||||
placeholder="Начните писать вашу главу... Поддерживается Markdown разметка."
|
||||
rows="20"
|
||||
style="width: 100%; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 14px; line-height: 1.5;"><?= e($chapter['content']) ?></textarea>
|
||||
<textarea id="content" name="content" class="writer-editor" style="display: none;">
|
||||
<?= e($chapter['content'] ?? '') ?>
|
||||
</textarea>
|
||||
|
||||
<div style="margin-top: 0.5rem; font-size: 0.9em; color: var(--muted-color);">
|
||||
<strong>Подсказка:</strong> Используйте Markdown для форматирования.
|
||||
<a href="https://commonmark.org/help/" target="_blank">Справка по Markdown</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="margin-top: 1rem;">
|
||||
<label for="status" style="display: block; margin-bottom: 0.5rem; font-weight: bold;">
|
||||
@@ -81,7 +68,7 @@ include 'views/layouts/header.php';
|
||||
<p><strong>Создана:</strong> <?= date('d.m.Y H:i', strtotime($chapter['created_at'])) ?></p>
|
||||
<p><strong>Обновлена:</strong> <?= date('d.m.Y H:i', strtotime($chapter['updated_at'])) ?></p>
|
||||
</div>
|
||||
|
||||
<link href="/assets/css/quill_reset.css" rel="stylesheet">
|
||||
<script>
|
||||
function previewChapter() {
|
||||
const form = document.getElementById('chapter-form');
|
||||
@@ -118,6 +105,6 @@ function previewChapter() {
|
||||
document.body.removeChild(tempForm);
|
||||
}
|
||||
</script>
|
||||
<script src="/assets/js/markdown-editor.js"></script>
|
||||
<script src="/assets/js/editor.js"></script>
|
||||
<script src="/assets/js/autosave.js"></script>
|
||||
<?php include 'views/layouts/footer.php'; ?>
|
||||
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user