0
對於CKeditor,有兩個函數可用於從編輯器獲取數據。CKeditor的getHtml()和getData()之間的區別
在下面的示例中,有一個名爲p_editor
的實例,兩個函數的輸出都是相同的。
var p_editor=CKEDITOR.replace('question_editor');
$('#PostQuestion').on('click', function() {
console.log(p_editor.getData());
console.log(p_editor.document.getBody().getHtml());
console.log(p_editor.document.getBody().getText());
});
所以我想知道這兩個函數有什麼區別。