angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 370 forks source link

trusted option #208

Closed chkur closed 8 years ago

chkur commented 8 years ago

I don't understand where and how "trusted" option is used. I don't see it in code. So - I cannot use text aligning "out of the box". Every time when I get text from server - I get

<p>

without text-align style. At last I replaced viewValue in ngModel.render with

var viewValue = ngModel.$viewValue;

And now I get what I need. Maybe I missed something?

deeg commented 8 years ago

I am a little confused on your issue.

Can you please post a plunker reproducing it, so I can look into it more?

deeg commented 8 years ago

Please take a look at CONTRIBUTING.md.

If you have found a bug, please open a new issue with a plunker re-creating it.

jarekb84 commented 8 years ago

I think what the OP's issue is that the documentation says you can pass a trusted option to this directive, but there's no actual code in the library that uses that option anymore.

Looks like trusted was added here https://github.com/angular-ui/ui-tinymce/commit/4d94282ffc0962daf0a67d6bed0f44ac05ca8e96

Documentation updated here https://github.com/angular-ui/ui-tinymce/commit/da10af39110cad92a2269a7b17693a8bd2c45d6e

And then the logic removed here, but docs were not updated https://github.com/angular-ui/ui-tinymce/commit/23692d5fbe7adee81ac9ad7aab10b67d8eb8ae0b

So by default $sce is used and there's no way to disable it.

jarekb84 commented 8 years ago

I've added a small PR to update the docs https://github.com/angular-ui/ui-tinymce/pull/266