Title: Formatting HTML Inserted by Shortcode
Last modified: November 11, 2020

---

# Formatting HTML Inserted by Shortcode

 *  [Brian Hogg](https://wordpress.org/support/users/brianhogg/)
 * (@brianhogg)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/formatting-html-inserted-by-shortcode/)
 * Hello!
 * I’ve created a custom shortcode integration using the `mailpoet_newsletter_shortcode`
   filter for [Event Calendar Newsletter](https://eventcalendarnewsletter.com/),
   and while it works great to insert the HTML for events it does not follow the
   MailPoet styles for an email.
 * The inline CSS is somehow added into the HTML added to a regular Text block in
   the MailPoet editor, since copy/pasting the same HTML works as expected:
 * [https://www.dropbox.com/s/h36rylug1ug9gzk/Screen%20Shot%202020-11-11%20at%201.39.38%20PM.png?dl=0](https://www.dropbox.com/s/h36rylug1ug9gzk/Screen%20Shot%202020-11-11%20at%201.39.38%20PM.png?dl=0)
 * Whereas the HTML inserted using a custom shortcode does not when previewing:
 * [https://www.dropbox.com/s/dwvnrrf081ie4rx/Screen%20Shot%202020-11-11%20at%201.39.19%20PM.png?dl=0](https://www.dropbox.com/s/dwvnrrf081ie4rx/Screen%20Shot%202020-11-11%20at%201.39.19%20PM.png?dl=0)
 * Is there some additional function or filter I can use to apply the styling? People
   will appreciate it looking pretty and consistent 🙂
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rafael Funchal](https://wordpress.org/support/users/rafaelfunchal/)
 * (@rafaelfunchal)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/formatting-html-inserted-by-shortcode/#post-13934599)
 * Hi there!
 * That happens because our Editor removes custom HTML from the newsletter automatically.
 * Have you tried to edit the newsletter styles manually? Here is how to do so:
 * [https://kb.mailpoet.com/article/289-styles](https://kb.mailpoet.com/article/289-styles)
 *  Thread Starter [Brian Hogg](https://wordpress.org/support/users/brianhogg/)
 * (@brianhogg)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/formatting-html-inserted-by-shortcode/#post-13948738)
 * Hi [@rafaelfunchal](https://wordpress.org/support/users/rafaelfunchal/) !
 * I don’t believe that’s what is happening, as the custom HTML is not removed. 
   It’s just not having the newsletter styles applied to it.
 * Perhaps there is another filter that can be run on the HTML inserted via the `
   mailpoet_newsletter_shortcode` filter to have the styles applied?
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Formatting HTML Inserted by Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/mailpoet/assets/icon-256x256.png?rev=3284564)
 * [MailPoet - Newsletters, Email Marketing, and Automation](https://wordpress.org/plugins/mailpoet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailpoet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet/reviews/)

## Tags

 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 2 replies
 * 2 participants
 * Last reply from: [Brian Hogg](https://wordpress.org/support/users/brianhogg/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/formatting-html-inserted-by-shortcode/#post-13948738)
 * Status: not resolved