Closed cytsunny closed 6 years ago
you can use storybook for that reason. https://github.com/storybooks/react-storybook and load the html file with dangerouslySetInnerHTML inside your story
If you still interesseted in such a solution, i can provide you some boilerplate code
Seems like it is for viewing react code? What is that do with MJML?
As i mentioned you can also view plain html by using dangerouslySetInnerHTML. I am using it together with the boilerplate. It is reactive, that means you don't have to reload while coding your newsletter. The compiled HTML is shown, immediately.
@Laslo89 i'd be interested in your boilerplate. i just tried the same but mjml throws an error because it can't find my component, though it's imported.
In Visual Studio Code, there is already an export function.
https://github.com/attilabuti/vscode-mjml#available-commands
This is indeed not possible, this package only renders the file, maybe it could be an interesting separate package.
As you said, the VSCode package does that well.
Would love to be able to "inspect" the code, or better yet just have the preview happen in the web browser.
Is there any possibility that an export of the underlying html code would be possible in Atom? The conversion of mjml to html is clearly already performed in Atom since Ctrl+Alt+P renders the html code in a side pane of Atom. Possible solutions could be: allow a "view source" in the already present browser pane that opens after Ctrl+Alt+P in Atom opening the already created html code inside Atom in the default browser, whereafter we could use the "view source" functionality if the browser
I am wondering if it is already possible to generate preview, is it also possible to view the compiled HTML as well? Something like the "View HTML" option in the online editor?