Zen Editor
Custom editor for Clai's Cuest Project
KEY COMMANDS
Following are the keyboard shortcuts (Alt and CTRL for Windows/Linux and Control and Command for OSX)
-
Alt/Control +
- 1 - H1
- 2 - H2
- ` - code-block
- ' - blockquote
- * - unordered-list-item.
-
CTRL/Command +
- O - Open finder
- L - Add URL (embedded link)
- B - make selection bold
- I - make selection italic
- U - underline selection
Markdown-like special characters:
# <SPACE>
- H1.##
- H2.1.
- OL.* <SPACE>
- UL.- `` ` - CODE.
# <SPACE>
- BLOCKQUOTE.
Installation
- npm.
npm install zen-editor
.import Editor from 'zen-editor'
JS (ES6)
At the minimum, you need to provide editorState
and onChange
props, the same as draft-js
.
;; ;; Component { superprops; thisstate = editorState: EditorState ; this this; } { thiseditor; } { const editorState = thisstate; return <Editor ref= { thiseditor = editor; } editorState=editorState onChange=thisonChange /> ; }; ReactDOM;
LICENSE
MIT