最近在使用Angular-trix这款富文本编辑器的时候遇到个问题,那就是数据初始化不了,后来找了半天,才找到答案,那就是给<trix-editor></trix-editor>
标签加上ng-if=true
,原因是什么还没搞明白,具体代码如下:
<trix-editor angular-trix ng-model-options="{ updateOn: 'blur' }" spellcheck="false" class="trix-content" ng-if='true' trix-initialize="trixInitialize(e, editor)"
ng-model="showEventCtrl.event.content" trix-change="trixChange(e, editor)"
trix-selection-change="trixSelectionChange(e, editor)" trix-focus="trixFocus(e, editor)"
trix-blur="trixBlur(e, editor)" placeholder="请输入通知内容"></trix-editor>