-
Notifications
You must be signed in to change notification settings - Fork 30k
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
NotebookCellData.mime #126280
Comments
Would this allow one to render base64 images? I'm assuming this would allow more powerful rendering of content such as rendering images for image/svg+xml, and latex for text/latex I guess this depends on the definition of Would the rendering architecture/API extensibility be similar to that of renderers? This means its possible to create something like a transformer (transform the markup text into a visual output). E.g. i could have a cell text containing contents of the XML from a *.drawio file that's renderered as a flowchart. |
@DonJayamanne Yes, you could do that (although for images, you probably just want to use markdown) In the future we may explore allowing binary cells as well, but for now the big limitation is that you must have text data. Right now though our focus is very much on the cases you listed, such as latex and more traditional markup languages |
@rebornix @jrieken I believe we may need to add a Let me know if you have any thoughts on this. Is adding a |
Extension cannot do that - only the |
We could also exploring having markup cells use outputs. Basically this would be a function Needs more thought |
|
Problem
The notebooks api has the concept of markup cells. The intent is that these cells are rendered as html by default, unlike code cells which are displayed as editors by default with their rendered output below them.
Currently we only support markdown markup cells. However we'd also like to support other markup languages, including ones that an extension may invent. However there's currently no way to set the mime type of a markup cell, which is needed for a custom renderer to be able to support it
Proposal
Add a new
NotebookCellData.mime
field. If not explicitly provided, this would default totext/plain
(ortext/markdown
it the cell'slanguage
ismarkdown
)The
mime
field would only be used when rendering the cell. The existinglanguage
field would still be used to determine which type of editor to display for the cellThe text was updated successfully, but these errors were encountered: