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 エディターで更新されません。応答を取得した後に CK エディターを初期化すると、データが表示されます。しかし、関数 initEditor を呼び出すと、警告が表示されます。
angular js + Ckエディターを使用しています