支持内容嵌入object, embbed等
This commit is contained in:
parent
05db669f91
commit
77a34a80a3
|
@ -1,4 +1,4 @@
|
|||
@app.controller 'AdminPostsController', [ '$scope', '$http', '$location', '$timeout', '$cookies', ($scope, $http, $location, $timeout, $cookies)->
|
||||
@app.controller 'AdminPostsController', [ '$scope', '$http', '$location', '$timeout', '$cookies', '$sce', ($scope, $http, $location, $timeout, $cookies, $sce)->
|
||||
|
||||
$scope.body_active = true
|
||||
|
||||
|
@ -23,6 +23,9 @@
|
|||
.success (res)->
|
||||
$scope.previewHTML = res
|
||||
|
||||
$scope.trustAsPreviewHTML = ()->
|
||||
$sce.trustAsHtml($scope.previewHTML)
|
||||
|
||||
$scope.addTag = (e)->
|
||||
new_labels= $(e.target).text()
|
||||
if $scope.labels
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
.content-field ng-show="body_active" ng-model= 'content'
|
||||
= f.input :content, :as=> :text, :label => false, input_html: { name: 'content', "ng-model"=>'content', 'ng-initial'=>'' }
|
||||
|
||||
.preview.markdown ng-hide="body_active" ng-bind-html=" previewHTML "
|
||||
.preview.markdown ng-hide="body_active" ng-bind-html=" trustAsPreviewHTML() "
|
||||
|
||||
.row
|
||||
.small-12.large-6.columns.posts-button
|
||||
|
|
Loading…
Reference in New Issue