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