How to get content in html format for cfeditor Rich text

I followed the instructions of the great gods on the Internet, always reminding CKEDITOR is not defined, that he could not get the content with html format. The code is the source code downloaded directly without modification.
this is

$(document) .ready (function () {

$("-sharpsubmit").click(function () { 
    var title = $("-sharpcaption").val(); /*.text().html()*/
    var val = CKEDITOR.instances.editor1.getData();
    /*  var editor = CKEDITOR.replace("editor1");
    editor.document.getBody().getText(); //
    editor.document.getBody().getHtml(); //html
    var valText = CKEDITOR.instances.editor1.EditorDocument.body.innerText(); */
    if (title.length == 0 || val.length == 0) {
        alert("");
   }else{
        alert(":" + title + "" + val + valText);
   }

});

Mar.05,2021
Menu