Browse Source

fix: hightlight after liveview finished loading

main
Inhji Y. 3 months ago
parent
commit
71066661b9
  1. 8
      assets/js/app.js

8
assets/js/app.js

@ -42,7 +42,10 @@ let liveSocket = new LiveSocket("/live", Socket, {
// Show progress bar on live navigation and form submits
window.addEventListener("phx:page-loading-start", info => NProgress.start())
window.addEventListener("phx:page-loading-stop", info => NProgress.done())
window.addEventListener("phx:page-loading-stop", info => {
Prism.highlightAll()
NProgress.done()
})
// connect if there are any LiveViews on the page
liveSocket.connect()
@ -63,6 +66,3 @@ if (document.querySelector("#editor")) {
initEditor("#editor")
})
}
Prism.highlightAll();
Loading…
Cancel
Save