angularjs kindEditor 中content获得不到值

时间:2022-05-29 15:02:05
angularjs kindEditor 中content获得不到值

需要修改下angular-kindeditor.js

angular-kindeditor.js

if (KindEditor) {
var editor = KindEditor.create(editorId, editorConfig);
//console.log("model value: "+ctrl.$modelValue);
var flag = 2;
scope.$watch(function () {
return ctrl.$modelValue;
}, function(newValue) {
if(flag>0) {
//console.log("new value: " + newValue);
editor.html(newValue);
flag--;
}
});
}

参考资源:http://www.w3cscript.com/Angular/2014-11-26/14.html