| 1 |
{# The Write/Preview pair, the textarea and the preview pane are the described |
| 2 |
markdown field's, not this template's: see `crate::quasi::rich_field`. The |
| 3 |
control keeps the id `text-body`, which is what `partial-item-text-editor.js` |
| 4 |
reads; the picker below addresses it by NAME (`body`), which is the whole of |
| 5 |
what `Act::fills` says. See `crate::quasi::media_picker`. #} |
| 6 |
<div class="text-editor" id="text-editor"> |
| 7 |
{{ crate::quasi::rich_field::html("text", "Content", "Write your content in Markdown...", body.as_deref().unwrap_or(""), crate::quasi::rich_field::Height::Tall)|safe }} |
| 8 |
|
| 9 |
{{ crate::quasi::media_picker::trigger("body")|safe }} |
| 10 |
<div class="editor-footer"> |
| 11 |
<span class="word-count" id="word-count">{{ word_count.unwrap_or(0) }} words</span> |
| 12 |
<span class="reading-time">{{ reading_time_minutes.unwrap_or(1) }} min read</span> |
| 13 |
</div> |
| 14 |
|
| 15 |
<div class="text-editor-actions"> |
| 16 |
<button type="button" class="btn-primary" id="save-text-btn" data-action="saveTextContent"> |
| 17 |
Save Content |
| 18 |
<span id="text-spinner" class="htmx-indicator"> ...</span> |
| 19 |
</button> |
| 20 |
<span id="text-save-status"></span> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
|
| 24 |
<div id="partial-item-text-editor-cfg" hidden data-item-id="{{ item.id }}"></div> |
| 25 |
<script src="/static/partial-item-text-editor.js?v=0820"></script> |
| 26 |
|