渲染tinyMCE后,我在控件上设置了内容,但控件没有绑定$ scope变量,所以我可以进行更改。 $ scope.performanceDescription是pdEditor的内容,$ scope.instructionsForBuyers是ifbEditor的内容。这是代码
var pdEditor = new tinyMCE.Editor('pd', CONFIG.tinymceOptions, tinyMCE.EditorManager);
var ifbEditor = new tinyMCE.Editor('ifb', CONFIG.tinymceOptions, tinyMCE.EditorManager);
pdEditor.render();
ifbEditor.render();
$scope.title = performance.Title;
$scope.category = performance.Category;
$scope.subCategory = performance.Sub_category;
$scope.instructionsForBuyers = performance.Instructions_for_buyers;
$scope.performanceDescription = performance.Description;
$scope.performanceHours = parseInt(performance.Performance_length / 60);
$scope.performanceMinutes = performance.Performance_length % 60;
$scope.minTimeHours = parseInt(performance.Buffer_time / 60);
$scope.minTimeMinutes = performance.Buffer_time % 60;
$scope.chosenLanguageTags = generateAutocompleteLanguageTags(performance.Languages_offered);
$scope.chosenPerformanceTags = generateAutocompletePerformanceTags(performance.Tags);
pdEditor.setContent($scope.performanceDescription, { format: 'raw'});
ifbEditor.setContent($scope.instructionsForBuyers, { format: 'raw'});e