A rich-text editor for Vue & React base on Prosemirror
import React from 'react';
import EasyEditor from 'easy-editor-react';
const options = {
autoFocus: true,
viewInstance: (view) => {
console.log('react view', view);
}
}
export default () => <EasyEditor {...options} />
-
autoFocus - Auto focus
-
injectEditableCSS - Inject editable mode CSS
-
basic wrapper class name called ProseMirror
-
example
.ProseMirror { outline: none }
-
-
injectPreviewCSS - Inject disabled mode CSS
- example
.ProseMirror { outline: 1px solid #329FD9; }
- example
-
viewInstance - Instance of prosemirror view
-
state - Prosemirror state
-
focused - Focus status
-
dom - Root DOM
-
dragging - Draging Element
-
lastClick - Last click information
- time - The time stamp
- x - Position x of mouse
- y - Position y of mouse
- type - Single click or double click
-
editable - Can editor or not
-
......
-