SOLVED

Re: Rich text editor adding paragraph tags

Go to solution
Gina_Powers
Level 2

Rich text editor adding paragraph tags

Is anyone having issues with the editor adding paragraph tags when working inside an email template? I was having this problem with the old editor on landing pages. I switch to the new editor to fix the landing page issue. Everything worked fine for about a week. But as of this morning, the new editor is adding paragraph tags to my emails. I haven't edited any landing pages yet. It adds a complimentary paragraph tag for every span tag or div tag in a mktEditable section. I can remove the tags by replacing the HTML but I cannot correct them inside the editor.

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Rich text editor adding paragraph tags

Grant is correct, this is a new feature, so go to Admin>Email>Edit Editor Settings and change the email value to none if you want to remove the <p> tags

View solution in original post

9 REPLIES 9
Grant_Booth
Level 10

Re: Rich text editor adding paragraph tags

Hi Gina,

This is explained in a comment of another discussion, here:

Re: New Text Editor is ****

There is now the option to set a default block-level element by going to Admin > Email > Edit Editor Settings. You might try setting it to "None" for the email editor and then run some tests to make sure things are working as you would expect.


Grant

Anonymous
Not applicable

Re: Rich text editor adding paragraph tags

Grant is correct, this is a new feature, so go to Admin>Email>Edit Editor Settings and change the email value to none if you want to remove the <p> tags

Gina_Powers
Level 2

Re: Rich text editor adding paragraph tags

YES!!!! I do believe this will fix my issue. I needed it set to NONE.

Grégoire_Miche2
Level 10

Re: Rich text editor adding paragraph tags

Hi All,

you should give a look to the comment Justin Cooperman made earlier today about setting it to "none" at the very end of this conversation New Text Editor is ****

If the <p> tag is causing trouble, your should consider rework your templates, because you will not always prevent users to add some <p> tags.

-Greg

Justin_Cooperm2
Level 10

Re: Rich text editor adding paragraph tags

In Admin > Email > Edit Editor Settings, customers can now control what the “root block element” is for the Email/Snippet text editor, as well as the Landing Page text editor. The root block element signifies how newly added text is encapsulated upon insertion. There are three options: <p>, <div>, and none.

Before this release, our email editor used “none” as the root block element. The legacy email editor uses “<p>” as the root block element. As of Friday, we've reverted back to having the default email root block element be <p> for all subscriptions. Customers can change this setting in that Admin dialog if they prefer the other behavior, but it does mean that some text formatting options in the editor will not function if they are using “none” as the default root block. Marketo recommends that customers use our default settings for the best experience (most text editors will default to using <p>). The landing page editor will continue to have its default set to use a root block of <div>, which can also be changed from the Admin dialog. The root block of rich-text program tokens cannot be changed and is set to <p>. One minor callout for rich-text tokens is that if the token only contains a single line of text, the surrounding <p> tags will be stripped automatically by Marketo when used in an Email or Landing Page.

So, what is a root block element?

If you have <div class=“mktEditable”></div> in an Email Template, you will see the following behavior when you open the section and insert “Hello World” text using the editor:

Root Block of <p>

<div class=“mktEditable”>

<p>Hello World</p>

</div>

Root Block of <div>

<div class=“mktEditable”>

<div>Hello World</div>

</div>

Root Block of none

<div class=“mktEditable”>

Hello World

</div>

Dan_Stevens_
Level 10 - Champion Alumni

Re: Rich text editor adding paragraph tags

Justin Cooperman​, can you explain what some of the issues might be by selecting NONE as the root option?  Many of our landing pages are coded as such (especially the newer guided LP templates) so that all of the formatting/styling of the text is defined using the template (vs. giving the end-user the ability to change it).  For example, here's a sample code block for one of our headings in a LP (where only the non-bolded area is editable:

<div class="mktoText" id="section3Header" mktoName="Section 3 Header">

     Enter your heading here

</div>

Justin_Cooperm2
Level 10

Re: Rich text editor adding paragraph tags

Some of the formatting functionality in the text editor won’t work as expected. In some cases, the editor can't properly manipulate the text if there isn’t a root element to act on.

Examples:

  • Single Space & Double Space options doesn’t behave correctly.
  • Indent More and Indent Less can behave unusually.
  • Alignment options don’t always work (add 3 lines of text, try to center align only the second line).

There are a few others, but should give you an idea. If you never use all of the formatting tools in the text editor, then you'd be fine.

Anonymous
Not applicable

Re: Rich text editor adding paragraph tags

I've had a request to change our setting to "None" for emails. Are there any anticipated changes with the new email template release if I do make this update?

Justin_Cooperm2
Level 10

Re: Rich text editor adding paragraph tags

No, the impact is always what I mention above. Without an HTML element to act on, some of the formatting will not work. It's important to understand exactly what that setting does. Some people may build templates and expect a <p> to surround their text and others may not. The templates we build would support either. In some cases, you may just notice extra vertical spacing if you have it set to <p>