Skip to content

x-govuk/edit-prototype-in-browser

Repository files navigation

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]

About

An in-browser editor for the govuk-prototype-kit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published