# WGLMakie/JSServe offline export

**URL:** <https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [April 23, 2021, 9:09am UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854 "2021-04-23T09:09:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Post date:** [April 23, 2021, 9:09am UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854/1 "2021-04-23T09:09:03Z")

</div>

Hi,

I opened [an issue](https://github.com/SimonDanisch/JSServe.jl/issues/92) at JSServe.jl, but I’m afraid it doesn’t catch a lot of attention and it’s not really a bug. Maybe someone else here knows?:

I have trouble making an offline plot similar to the surface plot in the [documentation of WGLMakie.jl](http://juliaplots.org/WGLMakie.jl/stable/). I don’t want to have sliders, just a movable camera. I don’t manage to export to a standalone html using [this example](https://github.com/SimonDanisch/JSServe.jl/blob/master/examples/basic_offline_makie.jl), also. And [this example](https://github.com/JuliaPlots/WGLMakie.jl/blob/master/test/offline_export.jl) doesn’t work for me. Does someone have an easy example to do this?

Thanks

---

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [April 26, 2021, 12:08pm UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854/2 "2021-04-26T12:08:09Z")

</div>

I think it is a bug: it looks like the API has changed (new `UrlSerializer` constructor, `dom2html`→`page_html`…) and `export_standalone` has not been updated. I tried a couple of things but I also could not get an export example to work.

---

<div class="post-metadata">

**Author:** ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Post date:** [April 27, 2021, 9:42am UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854/3 "2021-04-27T09:42:02Z")

</div>

Thanks for trying!

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [April 27, 2021, 9:49am UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854/4 "2021-04-27T09:49:42Z")

</div>

I haven’t gotten around to update those functions + docs yet…  
I think your best chance currently would be to use the approach with Page from [Home · WGLMakie.jl](http://juliaplots.org/WGLMakie.jl/stable/), but manually print the outputs to an io:

```julia
using JSServe, WGLMakie

page = Page(offline=true, exportable=true);
page_html = sprint() do io
    show(io, MIME"text/html"(), page)
    show(io, MIME"text/html"(), scatter(1:4))
    show(io, MIME"text/html"(), volume(rand(4, 4, 4)))
end

write("test.html", page_html)

```

---

<div class="post-metadata">

**Author:** ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Post date:** [April 27, 2021, 10:05am UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854/5 "2021-04-27T10:05:17Z")

</div>

thanks for this little hack, it works for me. I understand that it’s a big project that is wip and thank you for doing it, sorry I can’t help much.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [June 2, 2022, 10:58pm UTC](https://discourse.julialang.org/t/wglmakie-jsserve-offline-export/59854/6 "2022-06-02T22:58:26Z")

</div>

@sdanisch are there updated instructions for WGLMakie plots in Documenter pages?
