Skip to content

Commit cf7c5a8

Browse files
committed
Update interactive-html-export.md
1 parent 7a909ca commit cf7c5a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: doc/python/interactive-html-export.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ By default, the resulting HTML file is a fully self-contained HTML file which ca
5757

5858
### Inserting Plotly Output into HTML using a Jinja2 Template
5959

60-
You can insert Plotly output and text related to your data into HTML templates using Jinja2. Use `.to_html` to send the HTML to a Python string variable rather than using `write_html` to send the HTML to a disk file. Use the `full_html=False` option to output just the code necessary to add a figure to a template. We don't want to output a full HTML page, as the template will define the rest of the page's structure — for example, the page's `HTML` and `BODY` tags. First create an HTML template file containing a Jinja `{{ variable }}`. In this example, we customize the HTML in the template file by replacing the Jinja variable `{{ fig }}` with our graphic `fig`.
60+
You can insert Plotly output and text related to your data into HTML templates using Jinja2. Use `.to_html` to send the HTML to a Python string variable rather than using `write_html` to send the HTML to a disk file. Use the `full_html=False` option to output just the code necessary to add a figure to a template. We don't want to output a full HTML page, as the template will define the rest of the page's structure — for example, the page's `HTML` and `BODY` tags. First create an HTML template file containing a Jinja `{{ variable }}`. In this example, we customize the HTML in the template file by replacing the Jinja variable `{{ fig }}` with our graphic `fig`.
61+
62+
<!-- #region -->
6163

6264
```
6365
&lt;!DOCTYPE html&gt;
@@ -70,7 +72,6 @@ You can insert Plotly output and text related to your data into HTML templates u
7072
&lt;/html&gt;
7173
```
7274

73-
<!-- #region -->
7475

7576
Then use the following Python to replace `{{ fig }}` in the template with HTML that will display the Plotly figure "fig":
7677

0 commit comments

Comments
 (0)