mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
0f9342bf69
Refs #4259 - Auto-save new post when title loses focus. - If a post has '(Untitled)' for a title, regenerate slugs on all title changes--same behavior as a new post that does not yet have a slug. - Adjust some functional tests to handle the automatic transition from editor/new to editor/editor and the URL changes that go along with it.
40 lines
1.8 KiB
Handlebars
40 lines
1.8 KiB
Handlebars
<header class="page-header">
|
|
<button class="menu-button js-menu-button" {{action "toggleGlobalMobileNav"}}><span class="sr-only">Menu</span></button>
|
|
<h2 class="page-title">Editor</h2>
|
|
</header>
|
|
|
|
<div class="page-content">
|
|
<header>
|
|
<section class="box entry-title">
|
|
{{gh-trim-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=titleScratch tabindex="1" focus=shouldFocusTitle onFocusOut="autoSaveOnce"}}
|
|
</section>
|
|
</header>
|
|
|
|
<section {{bind-attr class=":entry-markdown :js-entry-markdown isPreview::active"}}>
|
|
<header {{action "togglePreview" false}} class="floatingheader">
|
|
<small>Markdown</small>
|
|
<a class="markdown-help" href="" {{action "openModal" "markdown"}}><span class="hidden">What is Markdown?</span></a>
|
|
</header>
|
|
<section id="entry-markdown-content" class="entry-markdown-content">
|
|
{{gh-codemirror value=scratch scrollInfo=view.markdownScrollInfo
|
|
setCodeMirror="setCodeMirror"
|
|
openModal="openModal"
|
|
typingPause="autoSave"}}
|
|
</section>
|
|
</section>
|
|
|
|
<section {{bind-attr class=":entry-preview :js-entry-preview isPreview:active"}}>
|
|
<header {{action "togglePreview" true}} class="floatingheader">
|
|
<small>Preview <span class="entry-word-count js-entry-word-count">{{gh-count-words scratch}}</span></small>
|
|
</header>
|
|
<section class="entry-preview-content js-entry-preview-content">
|
|
{{gh-markdown classNames="rendered-markdown js-rendered-markdown"
|
|
markdown=scratch scrollPosition=view.scrollPosition
|
|
uploadStarted="disableCodeMirror" uploadFinished="enableCodeMirror" uploadSuccess="handleImgUpload"}}
|
|
</section>
|
|
</section>
|
|
|
|
{{partial "publish-bar"}}
|
|
|
|
</div>
|