I am using angular -ui-tinymce (latest version 0.0.4, https://github.com/angular-ui/ui-tinymce/blob/master/src/tinymce.js ).
I ran into a problem that I cannot solve.
When loading the first page, the contents are loaded into the editor via ng-model. Then I go into another state, and then go back to the editor. The value still exists in the area (I checked it), but the content does not appear in the editor for some reason, I cannot figure it out.
This is a text field with a directive as an attribute:
<textarea rows="10" class="form-control" id="desc" ui-tinymce ng-model="valueFromScope"></textarea>
This happened after updating AngularJS from 1.5 to 1.2.1. I thought this had something to do with ngSanitize, but I'm not sure.
btw angular -sanitize and ngSanitize are included in the application.
Any tips?
Update
It looks like ngModel. $ Render does nothing.
ngModel.$render = function() { console.log(ngModel); tinyInstance = tinymce.get(attrs.id); if (tinyInstance) { tinyInstance.setContent(ngModel.$viewValue || ''); updateView(); } };
Nothing is printed, not even undefined, which means ngModel. $ render does not even start. Any reasons for this?
Update
I do not think the model. $ Render is connected, from what I understand. $ Render is only executed when programmatically changing, like, actually, editing text and what works.
I still can't figure it out, sometimes the value is displayed, and sometimes not.
javascript angularjs tinymce angular-ui
Orz
source share