CKEditor Ver.4 This is a cshtml file.
I try to get two kind of content types (with html tags & without one). But it seems not work that.
Error Msg:
Uncaught TypeError: Cannot read properties of undefined (reading 'getBody')
- HTML code:
<textarea class="edit-normal" id="content" msg="content" disabled="disabled">@Html.Raw(Model.Data.Content)</textarea>
- JS code
function GetData() {
// TODO: Get content with html tags ✓
var contentEditor = CKEDITOR.replace('content');
var content = contentEditor.getData();
// TODO: Get content without html tags
var rawContent = contentEditor.document.getBody().getText();
}