UNPKG

jupyterlab-emrys

Version:

A computational environment for Jupyter. Powered by Emrys

40 lines (39 loc) 1.11 kB
import * as CodeMirror from 'codemirror'; import 'codemirror/mode/meta'; import 'codemirror/lib/codemirror.css'; import { Message } from 'phosphor-messaging'; import { ResizeMessage, Widget } from 'phosphor-widget'; /** * A widget which hosts a CodeMirror editor. */ export declare class CodeMirrorWidget extends Widget { /** * Construct a CodeMirror widget. */ constructor(options?: CodeMirror.EditorConfiguration); /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Get the editor wrapped by the widget. * * #### Notes * This is a ready-only property. */ editor: CodeMirror.Editor; /** * A message handler invoked on an `'after-attach'` message. */ protected onAfterAttach(msg: Message): void; /** * A message handler invoked on an `'after-show'` message. */ protected onAfterShow(msg: Message): void; /** * A message handler invoked on an `'resize'` message. */ protected onResize(msg: ResizeMessage): void; private _editor; private _needsRefresh; }