Here’s the challenge: to take a normal MODx website post and transform it for use in an email despatch system.
The typical website post contains a linked stylesheet plus paragraphs like this:
But in email, we want our styling to be inline, like this:
<p style="font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px; color: #CCCCCC;text-align: left;">My paragraph.</p>
What we want is some magic that says: take this page and create a new version of it, replacing all paragraph tags with extended paragraph tags containing inline styling. This will be the page we load into our email despatch system.
(The alternative is to just write some sort of search-and-replace function in AutoHotKey or similar, and run the page through that each time. But that involves extra work.)
Does anyone have any ideas on how to transform a MODX post this way?