Hello,
I found that in HTML textarea elements, when writing multiline text, show texts with a horizontal whitespace for every line after the first one.
This is happening only when loading text, not at the time of writing it. I realised that it is only happening if the textarea is inside a partial template and the displayed text is passed as an attribute.
In my case, I have a form with a field description that is a multiline text.
form.handlebars
{{> components/center-info name=center.name description=center.description }}
components/center-info.handlebars
<section class="form-group mb-4">
<label for="center-name" class="block text-gray-700 font-medium">Nombre de la Centro</label>
<input id="center-name" name="name" type="text" value="{{name}}" required autofocus
class="mt-1 block w-full p-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500" />
</section>
<section class="form-group mb-4">
<label for="center-description" class="block text-gray-700 font-medium mb-1">Descripción</label>
<textarea id="center-description" name="description" rows="4" required
class="w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:outline-none">{{description}}</textarea>
</section>
For instance, for a string like this
The representation in the textarea inside the components/center-info.handlebars is this
However, if I place the textarea outside the component, i.e. in the form.handlebars template, it display the string correctly
I think this might be related with the parsing of the attribute 🤔
Thanks
Hello,
I found that in HTML textarea elements, when writing multiline text, show texts with a horizontal whitespace for every line after the first one.
This is happening only when loading text, not at the time of writing it. I realised that it is only happening if the textarea is inside a partial template and the displayed text is passed as an attribute.
In my case, I have a form with a field
descriptionthat is a multiline text.form.handlebars{{> components/center-info name=center.name description=center.description }}components/center-info.handlebarsFor instance, for a string like this
The representation in the textarea inside the
components/center-info.handlebarsis thisHowever, if I place the textarea outside the component, i.e. in the
form.handlebarstemplate, it display the string correctlyI think this might be related with the parsing of the attribute 🤔
Thanks