angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 371 forks source link

On load ui-tinymce error. getDoc().body undefined #261

Closed devwwg closed 8 years ago

devwwg commented 8 years ago

Products versions:

AngularJs 1.5.0 Jquery 2.2.4 Tinymce 4.3.12 UI-tinymce Latest commit

Tested with: Firefox, Chrome

Error: angular.js:13236 TypeError: Cannot read property 'body' of undefined at Object.Editor.getBody (tinymce.js:38602) at toggleDisable (tinymce.js:49) at tinymce.js:142 at angular.js:18744 at completeOutstandingRequest (angular.js:5804) at angular.js:6081

Solved commenting the line 142:

toggleDisable(scope.$eval(attrs.ngDisabled));

It seems you are trying to access your "tinyInstance" object when it doesn't exist on html body yet

vminstance commented 8 years ago

This error seems to be specific to the latest version of TinyMCE, and works as a charm with TinyMCE v.4.3.12.

deeg commented 8 years ago

So the issue is really with TinyMCE 4.3.13? Closing as a duplicate of #264

cengkuru commented 7 years ago

Had this issue before commenting toggleDisable(scope.$eval(attrs.ngDisabled)) on line 142 did it for me