I am currently using CKEditor as my WYSIWYG editor for the text on my site. And I just ran into a problem of using this editor with angular's partial views. The views are hidden with ng-hide and ng-show.
When I am outside of my current partial view the editor works fine. Meaning the tool bar pops up, the buttons on the tool bar work, and the text is editable as well.
However when I am in my partial view the popup still comes up, but the text is not editable, and the buttons are disabled.
The current code that brings up the editor in angular is
plunker.directive('ckEditor', function($http, $timeout) {
return {
require: '?ngModel',
link: function(scope, elm, attr, ngModel) {
var ck = CKEDITOR.inline(elm[0]);
if (!ngModel) return;
ck.on('pasteState', function() {
scope.$apply(function() {
ngModel.$setViewValue(ck.getData());
});
});
ngModel.$render = function(value) {
ck.setData(ngModel.$viewValue);
};
}
};
});
So my question is has anyone gotten CKEditor to work with partial views? If so how did you do it?