0.1.7 • Published 5 years ago
tcom-editor v0.1.7
Tcom Editor
A custom editor of tinyMCEditor, packed for ReactJs
Install guide
- Run
npm i tcom-editor
Example
Import first
import Editor from "tcom-editor"Usage
<Editor
assetPath="/editor"
/>with assetPath is public url to the directory containing the necessary css for the editor
Props
width: number of pixels width of editorheight: number of pixels height of editorinitialValue: initial value for editorhandleChange:(value) => voidretrieve current value of editorreference:(ref) => voidretrieve reference of editor. After havingref, callref.getHtmlEncode()to get value of editor
Development guide
npm inpm linkto maketcom-editoravaiable in global scope- In the project use
tcom-editor, runnpm link tcom-editor - In source code of
tcom-editor, runnpm link ../path-to-project/node_modules/reactandnpm link ../path-to-project/node_modules/react-dom - Run
npm run build
Publish to npm
npm publish --access public