Paragraphs are Centred in Medium Editor

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>

Are you sure your textarea is not placed in some div, where you applied text align center?

Good thought @Teodor!

This is what it looks like:

middle

But if text align was set to center, the heading would be in the centre too!

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 :slight_smile:

:rofl:

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:slight_smile:

1 Like