coder
coder

Reputation: 642

How to display the content added using vue editor in the form of html?

I have added data using vue-editor and when I try to display it is displaying as

<p class="ql-align-justify">A total of 51 plant species were recorded in the sampled area (0.16 ha). The average GBH and height recorded were 75.41 cm and 15.59 metres respectively. Average tree density was 330 trees per ha. <em>Tectona grandis, Shorea robusta, Cassia fistula, Ehretia laevis, Mallatus phillipensis </em>and <em>Trewia nudiflora </em>were the dominant tree species in the corridor. The ground cover was dominated by shrubs (64.87 %), herbs (29.93%) and grasses (3.2%). The remaining area was barren ground.</p><p class="ql-align-justify"><br></p><p><br></p>

The html tags are not working. So how can I able to format this in the form of html. Please help me to have a solution.

I am getting the data as json format. Is "" causes the problem? Please help me to have a solution

Upvotes: 0

Views: 131

Answers (1)

akuiper
akuiper

Reputation: 214927

Use v-html directive to output real html from html string; Say if content is the content added from vue-editor:

<span v-html="content"></span>

Upvotes: 1

Related Questions