Answer the question
In order to leave comments, you need to log in
How to keep formatting when inserting html piece from db?
Hello everyone ... I use FroalaEditor in the project, I added a custom button to it so that I could insert code. Here's what happens:
I send the following line to the database with all the tags:
<pre class="fr-tag">public ActionResult Search() { var allQuestions = questionRepository.GetAllQuestionsInfo().ToList(); LuceneSearchIndexer.RunIndex(allQuestions); string title = "Test"; var result = LuceneSearch.Search("Title", title); List SearchLit = new List(); foreach (var k in result) { var q = questionRepository.GetQuestionById(k.Id); SearchLit.Add(q); } return View(result); }<br></pre>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question