angular-ui / ui-tinymce

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

Theme is not a constructor #353

Open medkhelifi opened 6 years ago

medkhelifi commented 6 years ago

Hi; It my first time using ui-tinymce, I followed the official tutorial to create a simple timymce editor and I have this exception: Theme is not a constructor

controller.js

angular.module('invoice.invoices').controller('InvoiceSendCtrl', function ($rootScope, $scope, $state, $location, $log, $filter, Invoice, invoice) {
angular.extend($scope, {
        email: {
            message: 'hello tinymce'
        }
    });
    $scope.tinymceOptions = {
        theme: "modern",
        plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor"
        ],
        toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
        toolbar2: "print preview media | forecolor backcolor emoticons",
        image_advtab: true,
        height: "200px",
        width: "650px"
    };
});

view.html

<textarea ui-tinymce="tinymceOptions"  ng-model="email.message" class="form-control" rows="15"> </textarea>
haydenbr commented 6 years ago

Same

zamronypj commented 6 years ago

I had similar problem because of tinymce plugin, themes and skins content not get copied after minimizing with grunt. If you use bower, make sure to run bower install and that all

also get copied.

This issue I believe is not about angular-ui-tinymce.