Ghost/ghost/admin/app/templates/editor/edit.hbs

48 lines
2.4 KiB
Handlebars
Raw Normal View History

{{#gh-editor editorScrollInfo=editorScrollInfo as |ghEditor|}}
<header class="view-header">
{{#gh-view-title classNames="gh-editor-title" openMobileMenu="openMobileMenu"}}
{{gh-trim-focus-input type="text" id="entry-title" class="gh-input" placeholder="Your Post Title" value=model.titleScratch
tabindex="1" focus=shouldFocusTitle}}
{{/gh-view-title}}
<section class="view-actions">
<button type="button" class="post-settings" {{action "openSettingsMenu"}}>
<i class="icon-settings"></i>
</button>
{{gh-editor-save-button
isPublished=model.isPublished
willPublish=willPublish
postOrPage=postOrPage
isNew=model.isNew
save="save"
setSaveType="setSaveType"
delete="openDeleteModal"
submitting=submitting
}}
</section>
</header>
2015-06-03 17:44:12 +03:00
<section class="view-container view-editor">
<section class="entry-markdown js-entry-markdown">
<header class="floatingheader">
<span>Markdown</span>
<a class="markdown-help" href="" {{action "openModal" "markdown"}}><i class="icon-markdown"></i></a>
</header>
<section id="entry-markdown-content" class="entry-markdown-content">
{{gh-ed-editor classNames="markdown-editor js-markdown-editor" tabindex="1" spellcheck="true" value=model.scratch setEditor="setEditor" updateScrollInfo="updateEditorScrollInfo" openModal="openModal" onFocusIn="autoSaveNew" height=height focus=shouldFocusEditor}}
</section>
</section>
<section class="entry-preview js-entry-preview">
<header class="floatingheader">
<span>Preview</span>
<span class="entry-word-count js-entry-word-count">{{gh-count-words model.scratch}}</span>
</header>
<section class="entry-preview-content js-entry-preview-content">
{{gh-ed-preview classNames="rendered-markdown js-rendered-markdown"
markdown=model.scratch scrollPosition=ghEditor.scrollPosition updateHeight="updateHeight"
uploadStarted="disableEditor" uploadFinished="enableEditor" uploadSuccess="handleImgUpload"}}
</section>
</section>
</section>
{{/gh-editor}}