-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support html and markdown MIMEs #8
Conversation
Awesome! But maybe we could make the default to not capture html and markdown, i.e. to get that behavior users would by default either have to change the config or use Two random other thoughts: it would be really nice if there was a julia config story for things like that, so that packages don't have to come up with something... A shortcut would be a Other random thought: At some point it would be neat to add support for the Sorry for the babble here, I think if we could just change the default config story I mentioned in the second paragraph, we can merge this right away. |
I changed the default electron_showable(m, x) = m ∉ ("text/html", "text/markdown") && showable(m, x)
Yeah, I totally agree. I'm wondering if it's sufficient to have a very "lightweight convention" (i.e., no additional package). For example, use module __config__
module ElectronDisplay
single_window = true
showable = Base.showable
end
end in A downside of using using Revise
includet("config.jl") in
Sounds like a great idea. Is it as easy as, e.g., Vega Lite support? That is to say, is there any easy-to-use Javascript library we can bundle in ElectronDisplay.jl? |
I merged and tagged a release, so should be out soon! Thanks again :) I like the idea of a convention instead of a package. I guess another option would be to just use maybe nested
Probably ;) There seem to be a thousand different javascript grid options around, and I always was overwhelmed by the choice. The one that looks most awesome is what they used in https://marketplace.visualstudio.com/items?itemName=GrapeCity.gc-excelviewer, but I think that is not open source, unfortunately... https://github.com/JuliaComputing/TableView.jl uses something, so that might also be a good starting point. My guess is that the whole thing is very straightforward if one can identify the grid control. |
Thanks for review & merge & release!
Yeah, it does. I just thought
Finding a good Javascript library sounds very challenging :) but ag-grid used in JuliaComputing/TableView.jl#6 seems to be a super rich library. |
This PR first adds support for HTML and markdown. I then noticed that popping up ElectronDisplay window every time I do
?thing
could be annoying so I addedCONFIG.showable
option to let users fully control the behavior. It also adds and exports a functionelectrondisplay([mime,] x)
to forcefully displayx
inElectronDisplay
.CSS for markdown output is taken from https://github.com/sindresorhus/github-markdown-css. I just found it with a quick googling but the output looks good to me.