Search code examples
editoreditbackground-colormailchimp

Make td have editable background color in Mailchimp's editor


I'm setting up a custom template for a client where they want to be able to change the background color of some of the elements using the editor. I added an mc:edit property but it doesn't seem to have any effect - the property can't be changed. What else do I need to specify?


Solution

  • You need to define the editable tags in a style declaration block. You can put any tag in there that you want your client to be able to edit.

    Example:

    (copy and save in your template editor, and open in your campaign editor).

    <html>
        <head>
    
        <style type="text/css">
    
        /*
        @tab Body
        @section body style
        @tip Set the background color for your email's body area.
        */
        #table{
            /*@editable*/background-color:#888888;
        }
    
        </style>
        </head>
    
        <body>
            <table id="table">
                <tr>
                    <td>
                        <div mc:edit="content">
                            Lorem ipsum
                        </div>
                    </td>
                </tr>
            </table>
        </body>
    </html>
    

    Make sure that you give any editable part a unique mc:edit ID.

    Source: http://templates.mailchimp.com/getting-started/template-language/