angular-ui/ui-tinymce setup method in tinymceOptions breaks model binding

…衆ロ難τιáo~ 提交于 2019-12-11 09:37:48

问题


I want to add a custom button to the tinymce toolbar, and added a setup function to tinymceOptions as discribed in the docs:

$scope.tinymceOptions = {
     setup: function (editor) {
               editor.addButton('myMethod', { //myCode }
     },
    //more options
}

<textarea ui-tinymce="tinymceOptions" ng-model="model.content"></textarea>

Adding the setup function breaks the binding with the model. Content added to the editor is not synched to the model and vice-versa.

Are there known issues with this approach? Angular version : 1.2.17 (Ionic framework) ui-tinymce version : 0.0.5


回答1:


I know this is old issue, but I answer it for future references.

This issue was already discussed and resolved in angular-ui/ui-tinymce/issues/112. The solution is just to update the library.



来源:https://stackoverflow.com/questions/27320315/angular-ui-ui-tinymce-setup-method-in-tinymceoptions-breaks-model-binding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!