NotebookDocumentEditEvent
This commit is contained in:
parent
ac5d1a097e
commit
26ededa858
2 changed files with 11 additions and 2 deletions
|
@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
|||
|
||||
export function activate(context: vscode.ExtensionContext): any {
|
||||
context.subscriptions.push(vscode.notebook.registerNotebookContentProvider('notebookCoreTest', {
|
||||
onDidChangeNotebook: new vscode.EventEmitter<void>().event,
|
||||
onDidChangeNotebook: new vscode.EventEmitter<vscode.NotebookDocumentEditEvent>().event,
|
||||
openNotebook: async (_resource: vscode.Uri) => {
|
||||
return {
|
||||
languages: ['typescript'],
|
||||
|
|
11
src/vs/vscode.proposed.d.ts
vendored
11
src/vs/vscode.proposed.d.ts
vendored
|
@ -1682,11 +1682,20 @@ declare module 'vscode' {
|
|||
readonly metadata: NotebookDocumentMetadata;
|
||||
}
|
||||
|
||||
interface NotebookDocumentEditEvent {
|
||||
|
||||
/**
|
||||
* The document that the edit is for.
|
||||
*/
|
||||
readonly document: NotebookDocument;
|
||||
}
|
||||
|
||||
export interface NotebookContentProvider {
|
||||
openNotebook(uri: Uri): NotebookData | Promise<NotebookData>;
|
||||
saveNotebook(document: NotebookDocument, cancellation: CancellationToken): Promise<void>;
|
||||
saveNotebookAs(targetResource: Uri, document: NotebookDocument, cancellation: CancellationToken): Promise<void>;
|
||||
readonly onDidChangeNotebook: Event<void>;
|
||||
readonly onDidChangeNotebook: Event<NotebookDocumentEditEvent>;
|
||||
|
||||
// revert?(document: NotebookDocument, cancellation: CancellationToken): Thenable<void>;
|
||||
// backup?(document: NotebookDocument, cancellation: CancellationToken): Thenable<CustomDocumentBackup>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue