function InsertHTML(txt) { // 원하는 에디터의 인스턴스를 가져온다. (board_contents 는 객체이름을 넣는다) var oEditor = CKEDITOR.instances.board_contents // Check the active editing mode. if ( oEditor.mode == 'wysiwyg' ) { // Insert the desired HTML. oEditor.insertHtml( txt ); return true; } else alert( '위지윅 모드여야 가능합니다!' ); return false; } 기존 내용에 컨텐츠를 추가할 때는 아래처럼, oEditor.insertHtml(txt) 기존 내용에 컨텐츠를 삭제하고 추가할 때는 아래처럼, oEditor.setData(txt); 기존 내용을 가져올때는 아래처럼 oEditor.getData(txt);
|
|||||||||||