Open sergiu-statache opened 7 months ago
I'm using a decorator to wrap my stories and I get around this by specifying a new "root" in preview.js:
const preview = {
parameters: {
html: {
root: "my-wrapper-tag", // default: #storybook-root
Using that as the root omits it from the HTML output in your addon panel.
As you know, Storybook supports decorators which can be multiple HTML tags wrapping the main Story.
Now if you go to the HTML tab to see the HTML you'll see the Story HTML, but if the story has some decorators attached to it, the HTML tab will show the HTML with the decorators (which is confusing for some devs because that's not the HTML of that component - decorators are only to facilitate the display of the component in Storybook)
It would be great if a config option would be added for this plugin to ignore decorators when showing HTML.
Thanks and hope all is clear!