ui-tinymce
ui-tinymce copied to clipboard
tinymce Option not working inside a custom directive
So I have the following proble: I set up the following options in my controller:
scope.tinymceOptions =
{
toolbar:
'bold italic | link image | alignleft aligncenter alignright',
menubar: false
};
(scope being the way the scope is defined in the directive)
template-side, I have the following:
<div ng-if="!!tinymceOptions">
<textarea ui-tinymce="tinymceOptions" ng-model="tinymceModel" ></textarea>
</div>
So the tag wrapped around a ngif to make sure tinymceOptions actually exists.
However, what I see is the following:

I tried a few options already: Obviously changing the options themselves, checking if tinymce is loaded, applying the options directly within the html.. is that a normal behavior?
I've found that the only way to get ui-tinymce to recognize my options is to explicitly restate the controller in the textarea:
<textarea ui-tinymce="tinymceOptions" ng-model="activeObject.Description" ng-controller="ApplicationCtrl">
where ApplicationCtrl is the controller I'm using (In this case the master one for the app)