Parse preview markdown with filter
This commit is contained in:
parent
14233b6954
commit
9f8ab3466b
@ -97,7 +97,7 @@ app.controller("create", ["$scope", "$http",
|
||||
{
|
||||
// Only parse if there is content and if the preview is toggling on
|
||||
return $scope.content && $scope.previewing
|
||||
? marked($scope.content)
|
||||
? $scope.content
|
||||
: " ";
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</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>
|
||||
<div class="preview" ng-bind-html="previewHtml() | markdown" ng-show="previewing"></div>
|
||||
<br>
|
||||
<div class="buttonContainer">
|
||||
<button type="submit" ng-disabled="previewing">Submit</button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user