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.
Solved! Go to Solution.
This is explained in a comment of another discussion, here:
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.
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.
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>
Root Block of <div>
Root Block of none
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
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.
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.
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?
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>