I am building a small app using Angular JS and Angular UI. I have found the TinyMCE directive in Angular UI really helpful. However, I have now set up routing with Angular, loading partial Jade templates.
The JS that configures the TinyMCE is included in this partial view, so it doesn't execute (this makes sense since it is script returned by ajax request). In my controller I tried using:
- $scope.$on("$routeChangeSuccess",function(){
- var quotesApp = angular.module('quotesApp', ['ui'], function($routeProvider) {});
- quotesApp.value("ui.config",{
- tinymce: {
- theme: "advanced",
- theme_advanced_buttons1: "undo,redo,|,bold,italic,underline,|,code",
- theme_advanced_buttons2: "",
- theme_advanced_buttons3: "",
- theme_advanced_statusbar_location: "bottom",
- force_p_newlines: false,
- width: 300
- }
- });
- });
But it doesn't init the
TinyMCE.
Can anyone point me in the right direction? I have break pointed through, it gets to the TinyMCE init function but I can't see at what point it breaks...https://bit.ly/2VSgyv8