You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@javiercf In many situations I find that the demo code needs to be more complicated than the codeblock. It would be nice to have some control over the way the block is handled.
Simply allow us to set the template as a string of HTML. Your current template shows us the formatted code, and inserts the rendered Component. It would be nice if those two things could be replaced by placeholders in our template string. For example <div>{{code}}</div><div>{{component}}</div>
I think if we support a custom template for the code source and executed, we'll need to add an option in the loader that would go into the webpack config.
Activity
javiercf commentedon Jan 16, 2017
Can you give me an example of what you want to achieve?
lukaswelinder commentedon Jan 21, 2017
@javiercf In many situations I find that the demo code needs to be more complicated than the codeblock. It would be nice to have some control over the way the block is handled.
mrbinky3000 commentedon Jan 23, 2017
Simply allow us to set the template as a string of HTML. Your current template shows us the formatted code, and inserts the rendered Component. It would be nice if those two things could be replaced by placeholders in our template string. For example
<div>{{code}}</div><div>{{component}}</div>
mrbinky3000 commentedon Jan 23, 2017
I'm using handlebars above, but use any method you like.
lukaswelinder commentedon Jan 24, 2017
@mrbinky3000 I was thinking something more along the lines of convention on the language/render declaration:
However I do like the idea of being able to decide where the component is rendered:
Or something along those lines...
fernandopasik commentedon May 9, 2017
I think if we support a custom template for the code source and executed, we'll need to add an option in the loader that would go into the webpack config.