Angular Twix Editor does not send value using ng-model

I have a problem. I want to add a text editor to my page. I choose Angular -twix editor. I added to my page and connected to the controller. I initialize the first value for a text editor. There is no problem to get the value, but when I write some text ng-model does not send

(function () {
  'use strict';

  angular.module('BlurAdmin.pages.writing.newcontent')
      .controller('newcontentCtrl',['$scope','$sce','$http', '$translate','$filter', 'toastr', 'serverNode','newContentServices','categoryServices','tagServices', newcontentCtrl]);
      
     function newcontentCtrl($scope, $sce, $http, $translate, $filter, toastr, serverNode, newContentServices, categoryServices, tagServices) { 
       $scope.newWriting ={
                title:"First Title",
                text:"First Text",
                customField:"",
                category:"",
                tags:"",
                status:"",
                publistTime:"",
                publishDate:""
            };
       
       console.log($scope.newWriting.text);
       
           }
}) ();
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<trix-editor class="trix-content" style="color: white; min-height: 200px;" placeholder="Enter Text" angular-trix ng-model="newWriting.text">
            </trix-editor>
Run codeHide result

value for the controller.

+4
source share

Source: https://habr.com/ru/post/1652358/


All Articles