Browse Source

Add docs about saving data

Steven Silvester 7 năm trước cách đây
mục cha
commit
1639781fcf
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      docs/extensions_dev.md

+ 7 - 0
docs/extensions_dev.md

@@ -174,6 +174,13 @@ key in its `package.json` with `"mimeExtension"` metadata.  The value can be
 `true` to use the main module of the package, or a string path to a specific
 module (e.g. `"lib/foo"`).
 
+The mime renderer can update its data by calling `.setData()` on the model
+it is given to render.  This can be used for example to add a `png` 
+representation of a dynamic figure.  When using `IDocumentWidgetFactoryOptions`, you can update the document model by calling `.setData()` with updated data
+for the rendered MIME type.  The document can then be saved by the user in the 
+usual manner.
+
+
 ## Themes
 A theme is a JupyterLab extension that uses a `ThemeManager` and can be
 loaded and unloaded dynamically.  The package must include all static assets