在这个沉重的我正在尝试更改KendoEditor小部件的背景色(参见APIReference这里)。不过,背景色不会改变。这个密码怎么了?
HTML
<div class="box">
<textarea kendo-editor="editor" ng-model="text"></textarea>
</div>Javascript
var app = angular.module("app", [ "kendo.directives" ]);
app.controller('myCtrl', function($scope) {
$scope.$on("kendoWidgetCreated", function(event, widget){
if (widget === $scope.editor) {
$scope.editor.body.style.backgroundColor = "#f00";
$scope.editor.refresh();
}
});
});发布于 2015-06-15 23:11:07
这是因为您刷新它,尝试删除$scope.editor.refresh();。当我试着用你的扣篮时,效果很好
发布于 2015-06-15 18:10:19
你能试一试吗:给id来说,编辑器到文本区域,获取它的数据,然后应用样式。
var编辑器=$(“#编辑器”).data(“kendoEditor”);editor.body.style.backgroundColor = "#f00";
https://stackoverflow.com/questions/30851976
复制相似问题