jim31415
jim31415

Reputation: 8808

tinyMCE in an angularjs modal dialog only works on the first popup

There is a modal box that is opened from the page multiple times. The tinyMCE control is initiated on the first popup but on subsequent popups, the textarea is not transformed.

I tried using a timer as suggested here stackoverflow/17825282 but got the same result.

Code on Plunker

Upvotes: 1

Views: 866

Answers (1)

Petr Averyanov
Petr Averyanov

Reputation: 9476

From docs: https://github.com/angular-ui/ui-tinymce Be sure not to set an id attribute.)

So just remove id:

    <textarea ui-tinymce="" ng-model="tinymceModel">{{SectionTemplate.Preface}}</textarea>

http://plnkr.co/edit/Mv2fLWuKiVjEIy77XNF0?p=preview

Upvotes: 2

Related Questions