voidlabs / mosaico

Mosaico - Responsive Email Template Editor
https://mosaico.io
GNU General Public License v3.0
1.71k stars 504 forks source link

Getting preview html code method #293

Closed asbag closed 7 years ago

asbag commented 7 years ago

Hi, I initialize mosaico with "start" method instead of "init" method running with PHP backend. I was trying to show in a pop-up window the result of html preview code generated by Mosaico when I click in the "Show Live preview" button. I was wondering if there is a method to be called which get this structure - only html code - so that instead of put it in the tag "#frame-container" shown in the right hand side of the page when I click in th "show live preview" button, I would need this code to be shown it in a popup window.

Hope you can understand me.

Thank you so much.

bago commented 7 years ago

Using a "mosaico plugin" you can call viewModel.exportHTML(); https://github.com/voidlabs/mosaico/wiki/Mosaico-Plugins