0.3.2 • Published 8 months ago

@x-govuk/edit-prototype-in-browser v0.3.2

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

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

0.3.0

9 months ago

0.2.1

9 months ago

0.3.2

8 months ago

0.3.1

9 months ago

0.2.0

11 months ago

0.1.0

11 months ago