9 Replies Latest reply on May 25, 2016 1:19 PM by Justin Cooperman

    Rich text editor adding paragraph tags

    Gina Powers

      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.

        • Re: Rich text editor adding paragraph tags
          Grant Booth

          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

          3 of 3 people found this helpful
          • Re: Rich text editor adding paragraph tags
            Jamie Lewis

            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

            2 of 2 people found this helpful
            • Re: Rich text editor adding paragraph tags
              Gina Powers

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

              • Re: Rich text editor adding paragraph tags
                Grégoire Michel

                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

                • Re: Rich text editor adding paragraph tags
                  Justin Cooperman

                  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>

                  3 of 3 people found this helpful
                    • Re: Rich text editor adding paragraph tags
                      Dan Stevens

                      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>

                        • Re: Rich text editor adding paragraph tags
                          Justin Cooperman

                          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.

                          2 of 2 people found this helpful