0

In my admin panel i got tinymce textarea. I want to preview all my changes. i get html from tinymce

$scope.text_in = tinymce.get('myTextAreaName').getContent();

and it looks like:

<h1 style="text-align: center;">AAA</h1>
<h3 style="text-align: center;">BBB</h3>

I'm using ngSanitize and my element where i want to inject HTML

<div class="new" ng-bind-html="text_in"></div>

Thats looks ok, BUT. I got html markup without inline styles. All other styles from css works fine. When i inspecting element there are

<h1>AAA</h1>
<h3>BBB</h3>

What am i doing wrong?

1 Answer 1

1

According to Angular documentation you can by pass the sanitize.

http://docs.angularjs.org/api/ngSanitize.$sanitize

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.