TinyMCE不会在setContent之后更新ng-model

时间:2014-09-15 08:04:23

标签: angularjs tinymce

渲染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

0 个答案:

没有答案