Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render type "OFFLINE" is not easily visualized #27

Open
daviesthomas opened this issue Dec 22, 2020 · 1 comment
Open

Render type "OFFLINE" is not easily visualized #27

daviesthomas opened this issue Dec 22, 2020 · 1 comment

Comments

@daviesthomas
Copy link

Heya.

Very useful library :)

The jupyter visualization is perfect, but I'm not a fan of using notebooks :). It would be convenient if the "OFFLINE" render mode opened a window rendering the HTML instead of just saving it to some local directory.

Has this functionality been explored or is this possible in lib today? Could default to open in the default browser or render in an "iframe" created by Tkinter. If this functionality is favoured I'd love to discuss here and I can help implement it if needed.

~ tom

@daviesthomas
Copy link
Author

daviesthomas commented Dec 22, 2020

could use tkinter to open in a specific window.

from tkinterhtml import HtmlFrame
import tkinter as tk

root = tk.Tk()

frame = HtmlFrame(root, horizontal_scrollbar="auto")
 
frame.set_content("<html></html>")

or webbrowser to simply open in default browser (https://docs.python.org/2/library/webbrowser.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant