Offline Editor

Hello
I want to deploy a Observable Editor on my local server, is there a open source code which can finish this?

I think the answer is no, mainly because the strong emphasis on community building (which I find myself to be very grateful for). The most official response to this question I know of is here:

1 Like

Any updates about it? Is there a way to work with an Observable notebook offline and to import back modifications into the Observable cloud?

Thanks for checking in. The thread Aaron mentioned talks about number of offline editors. I assume you already looked at those. There are no plans yet to support a round-trip offline editing experience.

1 Like

Hi @Cobus! Yes, I’ve already checked out some of the pointers mentioned in the thread. I haven’t explored them in depth, but it looks like there isn’t yet a frictionless way to work with notebooks in an “Observable” fashion (i.e., Web interface, cells, reactiveness, … ). It’d great using a full-fledged local version of Observable to export/import notebooks from observablehq. I understand that this is something that doesn’t play nicely with the idea of community, but sometimes you simply do not have a good Internet connection, or you just need to keep your code locally.

As always, thanks for your reply!

1 Like

@floatingpurr Observable is pretty smart about synchronising any edits you made while working offline, once a connection has been reestablished. This even includes file attachments. If you anticipate that you’ll go offline, it should suffice to just open a new notebook and have it sync when you’re back online.

However, many of the tools available through Observable’s Standard Library are loaded lazily and may not be available if your browser hasn’t cached them. The same applies to any notebooks you might import.

Can you describe what kind of work you want to do offline?

A couple of days ago, I gave a workshop on Observable. I was asked if Observable can work also offline, like Jupyter. I like to use observablehq and, TBH, I’ve never thought about an offline version. But probably some people are interested in using an observablehq-like platform offline.

I guess that the rationale of this need can be:

  1. working with offline Observable sporadically, importing and exporting notebooks back to observablehq. E.g., while commuting without an Internet connection;
  2. working with offline Observable programmatically, when users do not want (or can’t) save their work on observablehq.

However, many of the tools available through Observable’s Standard Library are loaded lazily and may not be available if your browser hasn’t cached them.

Yep. Pre-loading a notebook is the first thing I tried, but you can easily run into the problem you mentioned. Moreover, the risk of loosing your notebook seems too high to me.

You could probably create a notebook that loads all libraries explicitely, to prime your caches. However, I don’t see how a completely offline workflow is supposed to play out, since it would have to serve every library you may ever need locally. Not to mention that remote notebook imports would still be inaccessible.

You can already do that through 3rd party solutions like @asg017’s dataflow.

Agree. As you pointed out, case 2 can be completely covered by integrating the runtime into a custom project. You’ll probably rely on a completely different UI and workflow (e.g., non-web-based). But I guess that it’s not a big deal for the users interested in this flavor.

Case 1 looks way more complicated than case 2 because of the integration with observablehq and due to the issues you mentioned. In a hypothetical case 2, you might want to save an observablehq’s notebook to a file, modify it off line, and load it back to observablehq. I understand that the offline editing would come with some limitations and can’t be feasible for all notebooks. But maybe even just working offline with the standard library (+ import / export) can satisfy most of the needs of case 2.