angular-ui/ui-tinymce

Theme is not a constructor

medkhelifi opened this issue · 2 comments

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>

Same

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

  • bower_components/tinymce/plugins
  • bower_components/tinymce/themes
  • bower_components/tinymce/skins

also get copied.

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