Auto-insertion of <p> element around the [CONTENT] section tag

I’m creating a Campaign Template and I’m seeing that editor is auto-inserting an HTML paragraph element around the [CONTENT] tag that I insert to display the content in a specific place in the template.
Is there a way to stop this happening, as I would like the [CONTENT] tag to simply be inserted exactly as I code it.
The addition of this paragraph element is disrupting the final layout of my email such that it doesn’t format correctly.

Thanks!

Hey,

You can turn off the editors and just work in html if that helps

a
x

Thanks for replying so quickly Anna.
How would I do this? I’ll give this a go and see if I can’t just create the code like that.
Although, it’s really handy to be able to see the formatted content as it would appear.
I suppose I can always just create the HTML in another editor to be able to see the formatted output first, and then get it into phpList.
If you could just let me know how I would just create the HTML without using the editor - that would be great!
(I’m a little new to the whole phpList world!)
Apologies & Thanks.

Sorry Anna, I’ve just Googled how to remove the editor, and it appears that I just make a configuration file change and set the editor value to zero - this is fine, and I’ll try this.
I suppose my question is now then, is this insertion of the paragraph element to do with the FCKeditor or is it on the phpList side of things - I’m not sure where to look into whether I can get this behavior to stop?
Any ideas?

Easier than that, go to config > manage plugins and just turn

ah, sorry, I assumed from the way you were talking you knew how to compose in html alone. I would not advise this then if you are not an html person.

So let us take a look at the issue of the extra

.

First of all, can we isolate

  1. which editor are you using (is it silver and 3 lines or yellow ish and one line?)
  2. does it still occur if you use no template, so just put the template selection dropdown to – choose template

thanks

a
x

off the editor plugins

Sorry just read that bit, so you only need to do step 2 then.

I’m fine with creating HTML myself, or using another editor and then copying in the HTML - I’m a coder anyway - this is fine.
I just really need to know whether I can firstly get rid of this issue, which would be great, or if not, then secondly, just come up with a nice work around!
Thanks!

Answers to your questions.

  1. The editor is two yellowish lines, definitely not silver.
  2. Do you mean whether the paragraph insertion issue still happens if I chose no template - No. If I simply create content and use the [CONTENT] tag, the issue doesn’t seem to happen - it does appear as though the problem only exists when I’m trying to create my template.

Hope this helps.

I think you might be using this [CONTENT} tag wrongly. That tag is what goes into the template, which is uploaded by Campaigns > Manage Campaign Templates.

You don’t use the [CONTENT] tag in the body of your campaign, which is made at Campaigns > Send a campaign.

If you like you can send me a screenshot of where you are using the tag. Also, check out the manual System overview | phpList manual - the template chapters will be of help

Anna, as a new user, I cannot yet upload images - apologies.
I’m using the [CONTENT] tag in my template, not in my actual email.
The email and the tags and everything else is working, apart from the fact that the paragraph element gets added in to the source code, around the [CONTENT] tag automatically, and this only seems to happen within a template creation edit.
This must be something to do with the way that the phpList template editor is formatting the html text in the background.
It seems to be recognising that I have inserted the [CONTENT] tag but then goes ahead and wraps it with the paragraph element, which is really annoying, as I need it to be exactly where I placed it, without any additional (assumed) HTML.

It will be a shame if I cannot get this sorted out, as it means that I will need to change the way my email looks.
I basically have a good looking header, all good, and good footer and a good content section, but then there are blank lines that are seen between them because of the paragraph element inserted!
Argh!

:frowning:

Regards,
Paul.

Hi, this should not be happening to my knowledge

If you see the phpList email below, it looks seamless to me

Here is the code of that message as I receive it:

<html><head>=0A        <meta content=3D"text/html;charset=3DUTF-8" http-equ=
iv=3D"Content-Type">=0A        <title></title></head><body><!--START TEMPLA=
TE-->
<div style=3D"margin: 0px; background: #EBEBEB; color: #666; padding: 0px; =
text-align: center; width: 100%;">
<div style=3D"max-width:600px;display:block;margin:0px auto;">
<table cellspacing=3D"0px" cellpadding=3D"5px" bgcolor=3D"#993333" width=3D=
"100%" style=3D"margin: 0px auto;">
    <tbody>
        <tr>
            <td align=3D"right" valign=3D"middle" style=3D"font-size: 11px;=
 font-family: Arial,Helvetica,sans-serif;padding:10px">
            <p style=3D"margin:0px; padding: 0px; text-align: right;"><a hr=
ef=3D"http://announce.phplist.org/lists/lt.php?id=3DcBgJVgUaBwpMV1AABAM"  s=
tyle=3D"color: #FFF; text-decoration: none;">Forward this message</a></p>
            </td>
        </tr>
    </tbody>
</table>
<table cellpadding=3D"10px" height=3D"70px" width=3D"100%" style=3D"backgro=
und: #2C2C2C;margin: 0px auto;">
    <tbody>
        <tr>
            <td align=3D"left" valign=3D"middle" style=3D"padding:10px;vert=
ical-align:middle"><a href=3D"http://www.phplist.com/" title=3D"phpList" st=
yle=3D"color:#FFF;font-size:24px;font-family:Arial,Helvetica,sans-serif;fon=
t-weight:bold"><img src=3D"cid:17238b0a1c10a79848a3169800fb6c95" style=3D"b=
order: 0px;" alt=3D"phplist.com" /></a></td>
        </tr>
    </tbody>
</table>
<table cellspacing=3D"0px" cellpadding=3D"5px" width=3D"100%" style=3D"marg=
in: 0px auto; background:#FFF; color: #666; padding:0px;">
    <tbody>
        <tr>
            <td style=3D"font-size: 14px;font-family: Arial,Helvetica,sans-=
serif; text-align: left;">
            <table cellspacing=3D"0px" cellpadding=3D"5px" width=3D"100%" s=
tyle=3D" color: #666;;margin:0px auto">
                <tbody>
                    <tr>
                        <td style=3D"font-size: 14px; font-family: Arial,He=
lvetica,sans-serif; line-height: initial; text-align: left;padding:20px">
                        <h1 style=3D"font-size: 1.8em; margin: 1em 0; color=
: #993333 ; padding: 0; letter-spacing: -1px;">Latest news on phpList plugi=
ns</h1>
                        <p>Hi</p>

<p>There has been a lot going on with phpList plugins recently, so here is =
a newsletter to summarise all the action for you.</p>

<p>Plugins are a great way to adapt phpList to your precise needs, and ther=
e are many plugins available already from our <a href=3D"http://announce.ph=
plist.org/lists/lt.php?id=3DcBgJUAEaBwpMV1AABAM" >plugins home page</a>.</p=
>

Does that contain the same issue as you have?

A
x

My final email (the one that I receive) has the additional p tag and /p tag present (and the obvious blank line!), and I see this show up after saving in the template editor.
I think I’m just going to have to get rid of the formatting I have and make the content section plain white background and a text email, rather than trying to make it look the same as the header and footer - never mind.

Regards,
Paul.

Can I raise this as a bug anywhere?

What does your template look like, can you show the context of where you want to put the CONTENT placeholder? I suspect that it needs to be within a block level element, so you should be able to manually surround it with, say, a div element.

I guess that Anna’s template has the CONTENT placeholder within a td element.

Also, you should install the CKEditor plugin, as the FCKeditor, which you are using, might have other restrictions.

1 Like

Thanks Duncan - that seems to have solved the issue.
I think it was because the [CONTENT] tag wasn’t within any block level element!
So glad this has fixed the issue - thank you so much!

I now have another issue! :smile: It seems that the tables I’ve used have borders and I’ll need to get rid of those - I’ll google that!

Thanks so much!

1 Like