Is there a way to have a vue component which has a template area that only contains plain text? The problem I face with the current solution (using a div to wrap it around the text) is that I recursively concatenate these components with other text fragments in one line which often leads to jumps to the next row of the parent container because there is not enough space left on the right side of the text fragment that came before the current one. Consequently, text paragraphs which should look like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer molestie sit amet mauris sed sollicitudin. Curabitur non quam at nibh venenatis facilisis. Integer vitae augue vel quam condimentum ultricies. Mauris consequat elit vitae sollicitudin auctor. Donec volutpat velit nulla, vitae fermentum erat aliquet non. Mauris congue nibh eget justo sodales luctus.
Resultingly look like follows:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer molestie sit amet mauris sed sollicitudin.
Curabitur non quam at nibh venenatis facilisis. Integer vitae augue vel quam condimentum ultricies.
Mauris consequat elit vitae sollicitudin auctor. Donec volutpat velit nulla, vitae fermentum erat aliquet non.
Mauris congue nibh eget justo sodales luctus.
Under consideration that there are 5 text fragments in the above example, respectively.
This is how the said component is implemented with comments inside the template tags to concretize my issues:
<template>
<div>{{element.text}}</div> <!-- This is how I can do it to this point-->
{{element.text}} <!-- This is what I would like to do-->
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import TextElement from '@/models/elements/Text'
@Component
export default class TextWrapper extends Vue {
@Prop() element!: TextElement
}
</script>
<style scoped>
</style>