1

I am having problem in integrating AngularJS UI tinymce in the app, however it is working fine in jsbin demo:

http://jsbin.com/itevos/2

However in app I receive this error when I load the app:

Uncaught TypeError: Cannot read property 'form' of null

which references tiny_mce_jquery_src.js:11955 with that line number being:

var n = t.getElement().form;

In the app, I checked all js/css files are loaded fine. This is what I have:

var app_htmleditor_module = angular.module('app_htmleditor', ['ui', 'components']).
    config(['$routeProvider', function($routeProvider) {
        $routeProvider.
            when('/', {
                templateUrl: getBaseURL() + 'public/tpl/app/htmleditor.htm',
                controller: HtmlEditorCtrl,
                reloadOnSearch:false
            }).
            otherwise( {redirectTo: '/'});
    }
]);

And textarea:

<textarea ui-tinymce ng-model="tinymce" id="{{fileUploaderID}}_html_tab" name="{{fileUploaderID}}_html_tab"></textarea>

I tried wrapping textarea with form tag but still received the same error.

2 Answers 2

3

@Dev555 There were issues with this directive but I know that we've updated recently. Please let us know if there are still problems. As an aside, angular-ui is in its early stages things change quite rapidly.

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

1 Comment

Yes I updated and used latest tinymce.js directive and it worked :)
0

I have copied your code and works fine, the only difference in mine is that I have only dependency with ui

angular.module('amiguiAdmin', ['amiguiAdmin.directives', 'ui'])

and also there is no form tag in the page.

I hope this will help you.

Regards

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.