Skip to content

Commit

Permalink
Merge pull request #1935 from nonowazu/bugfix-and-feat/fix-chrome-iss…
Browse files Browse the repository at this point in the history
…ue-in-editor-and-also-enable-better-previews-in-some-places-somebody-once-told-me-the-world-was-gon-

fix chrome editing issue and also enable new theme preview styles
  • Loading branch information
Fürst authored Sep 17, 2022
2 parents be5bc19 + 9400730 commit 3bc7d8a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion static/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
<!-- Darkreader -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script>
<!-- accurate previews -->
<script src="/theme-assets/editor/job-preview.js"></script>
<style>
/* fixes editor issues - remove after netlify-cms issue 5902 is fixed – https://github.com/netlify/netlify-cms/issues/5902 */
[data-slate-editor] {
-webkit-user-modify: read-write !important;
}
</style>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
Expand All @@ -20,7 +28,12 @@
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>
<script>
DarkReader.enable(); // Enable darkreader
CMS.registerPreviewStyle("preview.css"); // Register preview styles in Netlify
CMS.registerPreviewStyle("/css/main.css"); // Register preview styles in Netlify
/* job guide previews */
CMS.registerPreviewTemplate("leveling-guide", GenericJobGuide);
CMS.registerPreviewTemplate("basic-guide", GenericJobGuide);
CMS.registerPreviewTemplate("skills-overview", GenericJobGuide);
CMS.registerPreviewTemplate("openers", GenericJobGuide);
</script>
</body>
</html>

0 comments on commit 3bc7d8a

Please sign in to comment.