forked from jupyterlab/jupyterlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
31 lines (26 loc) · 757 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import { IRenderMime, markdownRendererFactory } from '@jupyterlab/rendermime';
import '../style/index.css';
/**
* The name of the factory that creates markdown widgets.
*/
const FACTORY = 'Markdown Preview';
/**
* The markdown mime renderer extension.
*/
const extension: IRenderMime.IExtension = {
id: '@jupyterlab/markdownviewer-extension:factory',
rendererFactory: markdownRendererFactory,
dataType: 'string',
documentWidgetFactoryOptions: {
name: FACTORY,
primaryFileType: 'markdown',
fileTypes: ['markdown'],
defaultRendered: ['markdown']
}
};
/**
* Export the extension as default.
*/
export default extension;