UPDATE
I found the reason, we can't render string with html tags inside the textarea. And I found the good solution for you, we can use
<div contenteditable="true"></div>

For more details. please check this link:

@using System.Net;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using System.Text.RegularExpressions;
@{
ViewData["Title"] = "75599709 Page";
string description = @"<i><strong>Virtual</strong></i>World ABC friend<strong>hii hello</strong>abc jitesh education<strong>hello all</strong>";
}
<script src="https://cdn.ckeditor.com/ckeditor5/29.2.0/classic/ckeditor.js"></script>
<textarea id="editor1" class="areacls" data-href="item1" onclick="createEditor('editor1')" name="hoverC" style="background-color: rgb(221, 226, 237); width: 100%; overflow: hidden; border: none; box-shadow: none; text-overflow: ellipsis; " rows="3">@Regex.Replace(description, "<.*?>", String.Empty)</textarea>
@section Scripts {
@{
await Html.RenderPartialAsync("_ValidationScriptsPartial");
<script>
const editors = new Map();
function createEditor(elementToReplace) {
//debugger;
return ClassicEditor
.create(document.querySelector('#' + elementToReplace))
.then(editor => {
editors.set(elementToReplace, editor);
})
.catch(err => console.error(err.stack));
}
</script>
}
}
Change your function createEditor
like below:
function createEditor(elementToReplace) {
//debugger;
return ClassicEditor
.create(document.querySelector('#' + elementToReplace))
.then(editor => {
editors.set(elementToReplace, editor);
})
.catch(err => console.error(err.stack));
}
Then the issue will be fixed.
Optional
I don't think this issue related to Html.Raw, you can find my code works well. If you still think related to Html.Raw. You can try below code in your .cshtml
@Html.Raw(@WebUtility.HtmlDecode(ViewBag.result))
Test Code And Result
1. Test Page source code
@using System.Net;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
ViewData["Title"] = "75599709 Page";
string description = @"<i><strong>Virtual</strong></i>World ABC friend<strong>hii hello</strong>abc jitesh education<strong>hello all</strong>";
}
<script src="https://cdn.ckeditor.com/ckeditor5/29.2.0/classic/ckeditor.js"></script>
<textarea id="editor1" class="areacls" data-href="item1" onclick="createEditor('editor1')" name="hoverC" style="background-color: rgb(221, 226, 237); width: 100%; overflow: hidden; border: none; box-shadow: none; text-overflow: ellipsis; " rows="3">@description</textarea>
@section Scripts {
@{
await Html.RenderPartialAsync("_ValidationScriptsPartial");
<script>
const editors = new Map();
function createEditor(elementToReplace) {
//debugger;
return ClassicEditor
.create(document.querySelector('#' + elementToReplace))
.then(editor => {
editors.set(elementToReplace, editor);
})
.catch(err => console.error(err.stack));
}
</script>
}
}
2. Test Result
