Skip to content

Instantly share code, notes, and snippets.

@kindohm
Created February 10, 2017 14:15
Show Gist options
  • Save kindohm/83070f1a6f8e0055937a2a40c158fef5 to your computer and use it in GitHub Desktop.
Save kindohm/83070f1a6f8e0055937a2a40c158fef5 to your computer and use it in GitHub Desktop.
pure javascript TextDocumentContentProvider for vscode
var vscode = require('vscode');
class PostWindowContentProvider {
constructor() {
this._onDidChange = new vscode.EventEmitter();
}
provideTextDocumentContent(uri) {
return 'Hi I am some content.';
}
get onDidChange() {
return this._onDidChange.event;
}
update(uri) {
this._onDidChange.fire(uri);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment