plotly.py
plotly.py copied to clipboard
Add HTML as mode bar download option
Currently, the mode bar download button can support png, svg, jpeg and webp as options to toImageButtonOptions. There is also fig.write_html() which can be used too save an interactive html file.
It would be useful to support html for the mode bar download button to avoid the necessity of adding a dcc.Download explicitly and keep to a consistent interface... Or, alternately, allow the user to provide custom behavior.
See #2114 for a discussion on custom modebar buttons
I couldn't understand how to save the figure as html using the custom modebar button.