I am facing an issue where some fields in my database contain strings that generate HTML code such as "<p'>Hello world</p'>". I am attempting to import these strings into a summernote rich text editor for editing purposes. However, I have tried the following code but it doesn't seem to be effective:
<html>
<head>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4033252c2523347200746e716e706d32236e70">[email protected]</a>/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="057660696066713745312b342b352877662b35">[email protected]</a>/dist/js/select2.min.js" defer></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0a797f67676f7864657e6f4a3a2432243b32">[email protected]</a>/dist/summernote.min.css" rel="stylesheet">
<script defer src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0a797f67676f7864657e6f4a3a2432243b32">[email protected]</a>/dist/summernote.min.js"></script>
</head>
<body>
<div class="form-group row">
<label asp-for="MainText" class="col-sm-2 col-form-label text-right"></label>
<div class="col-sm-10">
<div asp-for="MainText" id="summernote"></div>
<span asp-validation-for="MainText" class="text-danger"></span>
</div>
</div>
<script>
$(document).ready(function () {
$('#summernote').summernote();
});
</script>
</body>
</html>
I would appreciate any suggestions or advice on how to resolve this issue. Thank you.