# ANN: Webview.jl

**URL:** https://discourse.julialang.org/t/ann-webview-jl/17231
**Category:** Package Announcements
**Created:** [November 6, 2018, 11:55pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231 "2018-11-06T23:55:43Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 6, 2018, 11:55pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/1 "2018-11-06T23:55:43Z")

</div>

Hi, I would like to announce the [Webview.jl](https://github.com/joa-quim/Webview.jl) package that displays the contents of a markdown file in a browser window.

So far, and since I’ve yet learned much about the building package system, it does not install the needed library dependency, but for Windows it points the user to where he/she can download the required dll.

Current usage requires that user provides either the full name of the markdown file or the name of a file that lives in a package `docs/src` directory. It would be very nice if the package could find files like one can by the “?” helping mechanism. It would also be very, very nice if it could be made to display the `@docs` strings of a function but I do not know how to make it do that.

Any help to address these limitations is more than welcome.

---

<div class="post-metadata">

### Author: ![simonschoelly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonschoelly/32/21606_2.png) [@simonschoelly](https://discourse.julialang.org/u/simonschoelly)
#### Post date: [November 7, 2018, 11:26am UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/2 "2018-11-07T11:26:53Z")

</div>

Are you planning on supporting other formats such as svg?

I recently had the problem that accidentally Julia rendered the documentation as Latex when pressing “?”, so that should totally be doable. I think you have to study how the function `display` works, see here: [I/O and Network · The Julia Language](https://docs.julialang.org/en/v1/base/io-network/#Multimedia-I/O-1)

You might also have to create some temporary files, Julia provides functions `tempname` and `mktemp` for this.

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [November 7, 2018, 1:38pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/3 "2018-11-07T13:38:07Z")

</div>

A helper method like [this](https://discourse.julialang.org/t/function-to-get-docs-of-a-package-to-open-in-a-browser-window/17090/12) would be a really cool feature.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 7, 2018, 1:43pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/4 "2018-11-07T13:43:02Z")

</div>

> [@pdeffebach](#):
>
> A helper method like [this](https://discourse.julialang.org/t/function-to-get-docs-of-a-package-to-open-in-a-browser-window/17090/12) would be a really cool feature

But that’s what it already does. You just have to give it the full file name or the file being located in current dir.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 7, 2018, 1:47pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/5 "2018-11-07T13:47:45Z")

</div>

The Webview toolkit seems quite powerful but I’m only using it’s facility to display html (either from file or after converting a markdown text into html). I want also to explore the possibility of using it to display images, but have other things to do before that. What I really wanted next is to learn how to extract the `@doc` strings from functions and display it in the webview browser window. Like we do from Matlab.

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [November 7, 2018, 1:48pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/6 "2018-11-07T13:48:41Z")

</div>

Yeah an overload for modules would be nice. But only to avoid `joinpath(pathof(Module), "..","..", "README.md")`

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 7, 2018, 2:01pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/7 "2018-11-07T14:01:31Z")

</div>

OK, you can do also

```julia
doc(pkgname, "README")

```

where `pkgname` is the package name whose readme you want displayed. But note that `typeof(pkgname) == Module`

---

<div class="post-metadata">

### Author: ![simonschoelly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonschoelly/32/21606_2.png) [@simonschoelly](https://discourse.julialang.org/u/simonschoelly)
#### Post date: [November 7, 2018, 2:13pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/8 "2018-11-07T14:13:19Z")

</div>

You can do:

```julia
docmd = Base.Docs.doc("sin")
show(stdout, MIME"text/html"(), docmd)

```

and then replace “sin” with the function name (as string or as a symbol) and stdout with some other io object.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 7, 2018, 2:21pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/9 "2018-11-07T14:21:35Z")

</div>

OK, I see. Thanks, I’ll go for it as time permits.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [November 10, 2018, 6:16pm UTC](https://discourse.julialang.org/t/ann-webview-jl/17231/10 "2018-11-10T18:16:13Z")

</div>

You can now do

```julia
doc(sin)

```

and see it displayed in the `Webview` browser window.
