ritz078 / ng-embed

An AngularJS filter/directive for embedding emojis, media, maps, tweets, code and services
http://riteshkr.com/ng-embed
MIT License
122 stars 35 forks source link

With froala editor it's showing error (Important) #43

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi,

I'm using froala editor to insert some wisywig functionality to my post. i'm also using ng-embed on it. like this.

<span froala-view="post.body | embed"></span> then it's showing this error :disappointed:

Error: [$sce:itype] Attempted to trust a non-string value in a content requiring a string: Context: html error link

froala editor angular version im using

What i should do now ?

ritz078 commented 8 years ago

can be an angular version issue. not sure.

robman87 commented 7 years ago

Sound like post.body contains html nodes, it's not a string/text. angular-sanitize used by ng-embed is expecting a string. If you convert post.body to a string it will probably work. Take a look here. You should also turn of the htmlSanitize option in ng-embed as well so html tags don't get stripped away. <span froala-view="postBodyAsString | embed:{htmlSanitize:false}"></span>