2

I have a Blog/News kind of Website which means there will be Posts, they have a content which is a string of HTML stored in my database.

Since I also need stuff like Sliders and so on which won´t get generated via v-html I thought about what is the best practice to render a HTML String I retrieve from the Database on the Website Frontend.

I readed the Vue Docs about Render Functions but wasn´t able to solve my problem with the information there.

Example HTML String for understanding

<div class="slidercontainer">
   <slider :options="optionPreset1"></slider>
</div>

I save those presets in the finished Post Component. If there is any better way to solve this kind of thing with a DB then tell me, its not in Production yet so I can change such crucial things.

1 Answer 1

1

You need to use dynamic components. See this answer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.