Multiline is automatically adding a br tag in editor

Hiya,

I have a little problem that i have not come across before...

I have made a template with an editable area. When uploaded the multiline tag is automatically adding a <br /> when you start writing... here is my code;

<tr><td>
      <h2><singleline label='Email title'>Dear [firstname,fallback=Visitor],</singleline></h2>
        <multiline label="Description"></multiline>
</td></tr>

css para text:
p {    font-family: Arial, Helvetica, sans-serif, sans-serif;   
    font-weight: normal;
    font-size: 12px;
    text-align: left;
    text-decoration: none;
    color: #000000;
    padding: 0;
    margin-bottom: 5px;
}

when editing the multiline section in the CM editor, the source code ends up as:

<p>
    <br />
    testing</p>

Any ideas would be much appreciated :)

roshodgekiss roshodgekiss, 3 years ago

Hi littlefish, this is odd - do you see the <br /> in the multiline's Source view? Also, does the <br /> appear, even when all content has been removed?

In theory the editor shouldn't be adding any additional <br/> tags, but if there was some default text in the multiline initially, one may have slipped in. For example:

<multiline label="Article">
Here's some text<br />
Here's some more
</multiline>

We're happy to take a look at your template here, so  by all means, please get in touch with our team with account, client and template details, as well as the details above. I hope we get to the bottom of this! :D


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
littlefish littlefish, 3 years ago

Hi Rosanne,

Thank you for coming back to me :)
If nothing has been written in the online editor box then there is no <br /> in the source code, as soon as you type in the design view box it jumps and in the source view the <br /> has appeared before any text.

I thought it may be my code and i had missed/added a little gremlin but i stripped everything out and left a plain table with;

<tr><td>
      <h2><singleline label='Email title'>Dear [firstname,fallback=Visitor],</singleline></h2>
        <multiline label="Description"></multiline>
</td></tr>

This still produced the extra <br />

All the previous templates i have made used the below code with initial dummy text and I had no issues at all but i need to remove the text for a particular client...

<tr><td>
      <h2><singleline label='Email title'>Dear [firstname,fallback=Visitor],</singleline></h2>
        <multiline label="Description">Text to go here</multiline>
</td></tr>

I will send you my html file for you to see :)

Thanks :)

roshodgekiss roshodgekiss, 3 years ago

Hi there, it looks like Davida on our team is helping you with this now, but she needs some extra details. Thank you so much for writing in and looking forward to hearing from you again soon :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
littlefish littlefish, 3 years ago

Hiya,

We have progress.... this seems to be a Firefox and IE7 bug as far as we can tell.

Firefox and IE7 do not like empty text blocks and <muililine></multiline> is an empty text block. To prevent the block becoming invisible they add a <br /> tag which becomes visible when you start to type.

A simple solution to this is to have some dummy text between the tags and the <br /> is never added, for example;

<mulitline>Your text goes here</multiline>

Alternatively you can delete the <br /> when you fill in your content :)

Thanks Rosanne and Fionnuala for helping with this, very much appreciated :)

roshodgekiss roshodgekiss, 3 years ago

You're very welcome littlefish - I'm glad we could get to the bottom of this! :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098