mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
This makes sure that if folks get a relatively recent `vscode.d.ts`. It also lets us safely bump up the target to es2024 so you can use all the latest lib additions
notebook-serializer-sample
This is a very simple extension sample demonstrating the use of the notebook serializer and controller APIs. This sample includes:
- A notebook serializer that is activated for files matching
*.sample-json-notebook. It serializes notebook data into a simple JSON-based format. - A notebook controller that "executes" JSON-type code cells by adding an output to the cell that includes the content of the cell parsed as JSON.
- A command "Create JSON Notebook" that creates a new untitled notebook of this type.
Running this sample
cd notebook-serializer-samplecode .: Open the folder in VS Code- Hit
F5to build+debug - Run the command "Create JSON Notebook"
- Add and edit cells, and click the run button to invoke the controller