- 25
Hi
I was changed source view model for I can insert html code in post text.
Every thinks is right but I have littel problem.
My edited code on _CreateUpdatePost.cshtml
and _ForumPost.cshtml
Now I can insert html code on edit post page and is very good view. But in view post added automatic very <br> tag when use table.
I think this line not work corectly
Please help me
I was changed source view model for I can insert html code in post text.
Every thinks is right but I have littel problem.
My edited code on _CreateUpdatePost.cshtml
<div class="inputs">
@if (EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsInCustomerRole("ForumModerators"))
{
@Html.EditorFor(model => model.Text , "RichEditor")
}
else
{
if (Model.ForumEditor == EditorType.BBCodeEditor)
{
@Html.BBCodeEditor("Text")
}
@Html.TextAreaFor(model => model.Text, new { @class = "forum-post-text", TextMode = "MultiLine" })
}
</div>
and _ForumPost.cshtml
<div class="posttext">
@Html.Raw(HttpUtility.HtmlDecode(Model.FormattedText))
</div>
Now I can insert html code on edit post page and is very good view. But in view post added automatic very <br> tag when use table.
I think this line not work corectly
@Html.Raw(HttpUtility.HtmlDecode(Model.FormattedText))
Please help me