I am using summernote to add Image, Video, text. Also, I save image or video as Html Code that is type string to database. When I retreive video or image from the database to display on summernote, it takes nearly 5 minutes and I don't know why. However, when I retrieve text from the database to display on summernote, there is no problem.
Here is model
public class Article
{
[AllowHtml]
[Column(TypeName = "varchar(MAX)")]
public string Content { get; set; }
}
Here is View for summernote editor
@Html.TextAreaFor(x => Model.Content, new { @class = "", placeholder = @Blog.Helper.Resources.Content, @id = "summernote_1" })
In addition, If I use this below code in View
<div id="summernote_1">@Html.Raw(Model.Content)</div>
No problem with displaying video or image, but I cannot edit summernote. When I edit summernote, Model.Content is getting null.
If I use this below code in View
@Html.TextAreaFor(x => Model.Content, new { @class = "", placeholder = @Blog.Helper.Resources.Content, @id = "summernote_1" })
No problem with editing summernote, but displaying video or image takes nearly 5 minute.
Because of these reasons, I am trying to use this below code in View however this below code is getting error.
@Html.TextAreaFor(x => Html.Raw(Model.Content), new { @class = "", placeholder = @Blog.Helper.Resources.Content, @id = "summernote_1" })
Can I use html.raw in html.TextAreaFor or What can I do for this issue to display video or image and edit summernote. Sorry my bad english and I hope that someone can help me.