Antony
March 12, 2020, 10:10am
1
Hey everyone…
My paragraph text is appearing in the centre when I have the medium editor used in my app… what am I doing wrong in the setup?
<textarea id="i_notes" name="notes" type="text"
class="form-control input_text_field " autocomplete="banana"
dmx-on:click="show_label.addUniq(1110)"
dmx-on:input="show_label.addUniq(1110)"
dmx-bind:value="contact.data.contact.notes"
dmx-bind:placeholder="show_label.items.contains(1110)?'':apptext.value.1112"
dmx-bind:disabled="view_edit.value=='view'"
dmx-bind:rows="4"
is="dmx-medium-editor" align="left">
</textarea>
The code that is stored in the database has no centre attributes:
<h3>Heading</h3><p>Why are <b>paragraphs </b>in the middle?</p>
Teodor
March 12, 2020, 10:14am
2
Are you sure your textarea is not placed in some div, where you applied text align center?
Antony
March 12, 2020, 10:22am
3
Good thought @Teodor !
This is what it looks like:
But if text align was set to center, the heading would be in the centre too!
Teodor
March 12, 2020, 10:23am
4
Then probably somewhere in your css you have the paragraphs styled?
The easiest way to answer your question will be to check your page. Otherwise we can try guessing different things all day long
Antony
March 12, 2020, 10:27am
5
I’ve found the offending css!
When I first wrote it, hadn’t been expecting it to filter down to the <p>
tag within the textarea, but it makes sense that it does!
Thanks @Teodor …
1 Like