0

EDIT

If it helps the code that it errors at is

// Update model when calling setContent (such as from the source editor popup)
          setup: function (ed) {
            ed.onSetContent.add(function (ed, o) {   <----Right Here ed is undefined
              if (ed.isDirty()) {
                ed.save();
                ngModel.$setViewValue(elm.val());
                if (!scope.$$phase)
                  scope.$apply();

I'm trying to get a working example of tinymce ported through angular-ui but I keep getting the following error on line 1225 of angular-ui

Cannot call method add of undefined. I just updated my build of angular-ui so I know it's up to date.

I'm calling my scripts in this order

bootstrap css jquery ui css angular-ui css

jquery script

jquery ui script

tiny mce

tiny mce jquery port

angular js

angular ui.js

app.js

controller.js

directives.js

My HTML looks like this

<body ng-app="tinymce">
<textarea ui-tinymce ng-model="tinymce"></textarea>
<body>

and I pass the ui dependecy like so

"use strict";
var app = angular.module('tinymce', ['ui']);

I don't know what else to do.

any ideas?

2
  • Can you create a fiddle that reproduces the problem? I don't know if you're using the wrong version of TinyMCE, and there is not enough information here to go on. Commented May 6, 2013 at 19:36
  • Same issue with me, have you solve the problem ? Commented Aug 2, 2013 at 7:53

3 Answers 3

1

I've got the same problem, If you are installing using bower, you might be installing tinymce-release 4.0.2. I just found that that version is not working.

Using bower, the last available version is 3.5.8. I've simple change the version tinymce-release and now it works

Sign up to request clarification or add additional context in comments.

1 Comment

That was my issue as well
1

It seems they have not updated Bower with the latest code from github. If you copy this into your components folder it will work:

https://github.com/angular-ui/ui-tinymce/blob/master/src/tinymce.js

Comments

0

"use strict"; var app = angular.module('tinymce', ['ui.tinymce']);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.