Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

tinymce Option not working inside a custom directive #361

Open
Naenil opened this issue May 30, 2018 · 1 comment
Open

tinymce Option not working inside a custom directive #361

Naenil opened this issue May 30, 2018 · 1 comment

Comments

@Naenil
Copy link

Naenil commented May 30, 2018

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:

screenshot

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?

@juliaclement
Copy link

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants