29 lines
1.2 KiB
HTML
29 lines
1.2 KiB
HTML
<h1>Create a new post</h1>
|
|
<form class="createForm" ng-submit="onSubmit()">
|
|
<div>
|
|
<input type="text" class="title" ng-model="title" placeholder="Title" required>
|
|
<span class="titleAuthorSeparator">by</span>
|
|
<input type="text" class="author" ng-model="author" placeholder="Author" required>
|
|
</div>
|
|
<br>
|
|
<span><!-- Wrap <tags-input> to avoid weird behaviour with following elements -->
|
|
<tags-input
|
|
on-tag-adding="onTagAdding($tag)"
|
|
use-strings="true"
|
|
min-length="1"
|
|
add-on-comma="true"
|
|
add-on-blur="true"
|
|
class="tags"
|
|
ng-model="tags"
|
|
placeholder="Add tags">
|
|
</span>
|
|
<br>
|
|
<textarea class="content" ng-model="content" ng-hide="previewing" placeholder="Post content. Markdown supported!" required></textarea>
|
|
<div class="preview" ng-bind-html="previewHtml()" ng-show="previewing"></div>
|
|
<br>
|
|
<div class="buttonContainer">
|
|
<button type="submit" ng-disabled="previewing">Submit</button>
|
|
<button type="button" ng-class="{current: previewing}" ng-click="onPreview()">{{previewing ? 'Edit' : 'Preview'}}</button>
|
|
</div>
|
|
</form>
|