CK editor initialization
function initEditor(){
CKEDITOR.replace( 'editor1', {
on: {
//focus: onFocus,
//blur: onBlur,
// Check for availability of corresponding plugins.
pluginsLoaded: function( evt ) {
var doc = CKEDITOR.document, ed = evt.editor;
if ( !ed.getCommand( 'bold' ) )
doc.getById( 'exec-bold' ).hide();
if ( !ed.getCommand( 'link' ) )
doc.getById( 'exec-link' ).hide();
}
}
});
}
function getIndividualReportData( reportId ){
ReportService.getIndividualReportList( reportId ,
function( data ) // success
{
console.log(data);
$scope.report = data ;
initEditor();
},
function( msg ) // error
{
});
}
html-ck编辑器
<textarea cols="100" name="editor1" rows="50" data-ng-model="report.reportData">
{{ report.reportData }}
</textarea>
但是在得到响应之后,ck editor.Initilazing CK编辑器中的数据没有更新,如果我调用函数initEditor,那么它会显示数据.But,然后它会显示警告,编辑器实例"editor1“已经附加到提供的元素。
我使用的是angular js + Ck编辑器
https://stackoverflow.com/questions/19094927
复制相似问题