ditdot-dev / vue-flow-form

Create conversational conditional-logic forms with Vue.js.
https://www.ditdot.hr/en/vue-flow-form
MIT License
785 stars 175 forks source link

Feature request: slot **BeforeStart** #222

Closed nikolaysm closed 2 years ago

nikolaysm commented 2 years ago

Hi 👋 ,

Thanks for creating and sharing this great project!

It will be useful to add a slot BeforeStart or allow for QuestionType.SectionBreak > content to use html (v-html)?

nikolaysm commented 2 years ago

https://github.com/ditdot-dev/vue-flow-form/blob/02f307d00a6cf2e004f898a470977f22b79a1eab/src/components/QuestionTypes/SectionBreakType.vue#L3

Instead we can use

<span class="f-section-text" v-html="question.content"></span>

spinn commented 2 years ago

Hi @nikolaysm,

we already had a similar request and decided against it, you can see our reasoning here:

https://github.com/ditdot-dev/vue-flow-form/pull/108#issuecomment-693553925

For now we don't plan on adding HTML support but we'll consider adding this in a future version.

nikolaysm commented 2 years ago

Hi @spinn ,

Thanks for your reply!

How about slot BeforeStart similar as: https://github.com/ditdot-dev/vue-flow-form/blob/02f307d00a6cf2e004f898a470977f22b79a1eab/src/components/FlowForm.vue#L24

https://github.com/ditdot-dev/vue-flow-form/blob/02f307d00a6cf2e004f898a470977f22b79a1eab/src/components/FlowForm.vue#L26

spinn commented 2 years ago

Questions can be defined both via the questions prop or as components so we'd need a solution that works in both cases. But as I said, we'll definitely take this into consideration and try to find a solution for a future release.