@x-govuk/edit-prototype-in-browser
v0.3.2
Published
An in-browser editor for the govuk-prototype-kit
Downloads
8
Readme
Edit prototype in browser
This is a plugin to the govuk-prototype-kit which adds an in-browser editor.
Requirements
This works with the GOV.UK Prototype Kit v13.0.0 and above.
Phase: Beta
This is a beta product, we know that improvements need making and we'd like your feedback.
Configuration
If you want to have the editor on some pages but not others you can turn the editor off for by adding this near the top of your page:
<script>
window.XGOVUK = window.XGOVUK || {}
window.XGOVUK.editPrototypeInBrowser = window.XGOVUK.editPrototypeInBrowser || {}
window.XGOVUK.editPrototypeInBrowser.doNotEditThisPage = true
</script>
Currently the editor shows when you're running on localhost but not on other domains, if you want it to work on different domains you can add them like this:
<script>
window.XGOVUK = window.XGOVUK || {}
window.XGOVUK.editPrototypeInBrowser = window.XGOVUK.editPrototypeInBrowser || {}
window.XGOVUK.editPrototypeInBrowser.allowedDomains = ['example.com', 'another-domain.net']
</script>
Issues and feedback
[https://github.com/x-govuk/edit-prototype-in-browser/issues]