react-codemirror2
- Version 8.0.0
- Published
- 71.2 kB
- No dependencies
- MIT license
Install
npm i react-codemirror2
yarn add react-codemirror2
pnpm add react-codemirror2
Overview
a tiny react codemirror component wrapper
Index
Classes
Interfaces
ICodeMirror
- autoCursor
- autoScroll
- className
- cursor
- defineMode
- editorDidConfigure
- editorDidMount
- editorWillUnmount
- onBlur
- onChange
- onContextMenu
- onCopy
- onCursor
- onCursorActivity
- onCut
- onDblClick
- onDragEnter
- onDragLeave
- onDragOver
- onDragStart
- onDrop
- onFocus
- onGutterClick
- onInputRead
- onKeyDown
- onKeyHandled
- onKeyPress
- onKeyUp
- onMouseDown
- onPaste
- onRenderLine
- onScroll
- onSelection
- onTouchStart
- onUpdate
- onViewportChange
- options
- scroll
- selection
Classes
class Controlled
class Controlled extends React.Component<IControlledCodeMirror, any> {}
class UnControlled
class UnControlled extends React.Component<IUnControlledCodeMirror, any> {}
Interfaces
interface DomEvent
interface DomEvent {}
call signature
(editor: codemirror.Editor, event?: any): void;
interface EditorChangeEvent
interface EditorChangeEvent {}
call signature
(editor: codemirror.Editor, changeObj: codemirror.EditorChange): void;
interface ICodeMirror
interface ICodeMirror {}
property autoCursor
autoCursor?: boolean;
property autoScroll
autoScroll?: boolean;
property className
className?: string;
property cursor
cursor?: codemirror.Position;
property defineMode
defineMode?: IDefineModeOptions;
property editorDidConfigure
editorDidConfigure?: (editor: codemirror.Editor) => void;
property editorDidMount
editorDidMount?: ( editor: codemirror.Editor, value: string, cb: () => void) => void;
property editorWillUnmount
editorWillUnmount?: (lib: any) => void;
property onBlur
onBlur?: DomEvent;
property onChange
onChange?: ( editor: codemirror.Editor, data: codemirror.EditorChange, value: string) => void;
property onContextMenu
onContextMenu?: DomEvent;
property onCopy
onCopy?: DomEvent;
property onCursor
onCursor?: (editor: codemirror.Editor, data: codemirror.Position) => void;
property onCursorActivity
onCursorActivity?: (editor: codemirror.Editor) => void;
property onCut
onCut?: DomEvent;
property onDblClick
onDblClick?: DomEvent;
property onDragEnter
onDragEnter?: DomEvent;
property onDragLeave
onDragLeave?: DomEvent;
property onDragOver
onDragOver?: DomEvent;
property onDragStart
onDragStart?: DomEvent;
property onDrop
onDrop?: DomEvent;
property onFocus
onFocus?: DomEvent;
property onGutterClick
onGutterClick?: ( editor: codemirror.Editor, lineNumber: number, gutter: string, event: Event) => void;
property onInputRead
onInputRead?: EditorChangeEvent;
property onKeyDown
onKeyDown?: DomEvent;
property onKeyHandled
onKeyHandled?: KeyHandledEvent;
property onKeyPress
onKeyPress?: DomEvent;
property onKeyUp
onKeyUp?: DomEvent;
property onMouseDown
onMouseDown?: DomEvent;
property onPaste
onPaste?: DomEvent;
property onRenderLine
onRenderLine?: ( editor: codemirror.Editor, line: codemirror.LineHandle, element: HTMLElement) => void;
property onScroll
onScroll?: (editor: codemirror.Editor, data: codemirror.ScrollInfo) => void;
property onSelection
onSelection?: (editor: codemirror.Editor, data: any) => void;
property onTouchStart
onTouchStart?: DomEvent;
property onUpdate
onUpdate?: (editor: codemirror.Editor) => void;
property onViewportChange
onViewportChange?: ( editor: codemirror.Editor, start: number, end: number) => void;
property options
options?: codemirror.EditorConfiguration;
property scroll
scroll?: ISetScrollOptions;
property selection
selection?: { ranges: Array<ISetSelectionOptions>; focus?: boolean;};
interface IControlledCodeMirror
interface IControlledCodeMirror extends ICodeMirror {}
property onBeforeChange
onBeforeChange: ( editor: codemirror.Editor, data: codemirror.EditorChange, value: string) => void;
property value
value: string;
interface IDefineModeOptions
interface IDefineModeOptions {}
interface ISetScrollOptions
interface ISetScrollOptions {}
interface ISetSelectionOptions
interface ISetSelectionOptions {}
interface IUnControlledCodeMirror
interface IUnControlledCodeMirror extends ICodeMirror {}
property detach
detach?: boolean;
property editorDidAttach
editorDidAttach?: (editor: codemirror.Editor) => void;
property editorDidDetach
editorDidDetach?: (editor: codemirror.Editor) => void;
property onBeforeChange
onBeforeChange?: ( editor: codemirror.Editor, data: codemirror.EditorChange, value: string, next: () => void) => void;
property value
value?: string;
interface KeyHandledEvent
interface KeyHandledEvent {}
call signature
(editor: codemirror.Editor, name: string, event: any): void;
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (38)
- @babel/core
- @babel/plugin-transform-object-assign
- @babel/preset-env
- @babel/preset-react
- @nteract/mockument
- @types/codemirror
- @types/jest
- @types/react
- babel-loader
- codemirror
- coveralls
- css-loader
- enzyme
- enzyme-adapter-react-16
- express
- gulp
- gulp-babel
- gulp-beautify
- gulp-replace
- jest
- jest-environment-jsdom
- node-sass
- prismjs
- raf
- react
- react-dom
- react-redux
- react-test-renderer
- redux
- rimraf
- sass-loader
- sinon
- style-loader
- ts-jest
- typescript
- typescript-formatter
- webpack
- webpack-cli
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-codemirror2
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-codemirror2)
- HTML<a href="https://www.jsdocs.io/package/react-codemirror2"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1672 ms. - Missing or incorrect documentation? Open an issue for this package.