diff --git a/CHANGELOG.md b/CHANGELOG.md index dc09a54fe98..b4c1b5c766a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- Offline mode will no longer delete the Jupyter Notebook's require, requirejs, and define variables. ## [1.9.6] - 2016-02-18 ### Updated diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index 89df61a57f6..6981bead02c 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -61,14 +61,14 @@ def init_notebook_mode(): global __PLOTLY_OFFLINE_INITIALIZED if not __PLOTLY_OFFLINE_INITIALIZED: - display(HTML('' + - '')) + "});" + + "require(['plotly'], function(Plotly) {" + + "window.Plotly = Plotly;" + + "});" + + "")) __PLOTLY_OFFLINE_INITIALIZED = True