Closed henval2020 closed 1 year ago
Thanks for reporting @henval2020, since we're passing the frame window
and document
as props:
https://www.netlifycms.org/docs/customization/#registerpreviewtemplate
Could you dynamically add the styles in each component?
See an example here: https://github.com/netlify/netlify-cms/issues/4142#issuecomment-674505811 https://github.com/erezrokah/netlify-cms-reproductions/blob/d9300a4e970aa47dc4ec2054e7f30a0f85ae3796/public/index.html#L13
for scripts. You should be able to do the same with styles.
Closing as stale and/or outdated.
** Feature
Would it be possible if there would be multiple templates like this one (from one-click-hugo-cms)
To have their own respective css. Right now it was implemented like this CMS.registerPreviewStyle(styles, { raw: true }); Where it can only use one CSS for all templates.
So if we use the same class name on different templates, they would have different styling.