npm.io
0.1.7 • Published 5 years ago

tcom-editor

Licence
MIT
Version
0.1.7
Deps
6
Size
4.0 MB
Vulns
23
Weekly
0

Tcom Editor

A custom editor of tinyMCEditor, packed for ReactJs

Install guide

  1. 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 editor
  • height : number of pixels height of editor
  • initialValue : initial value for editor
  • handleChange : (value) => void retrieve current value of editor
  • reference : (ref) => void retrieve reference of editor. After having ref, call ref.getHtmlEncode() to get value of editor
Development guide
  1. npm i
  2. npm link to make tcom-editor avaiable in global scope
  3. In the project use tcom-editor, run npm link tcom-editor
  4. In source code of tcom-editor, run npm link ../path-to-project/node_modules/react and npm link ../path-to-project/node_modules/react-dom
  5. Run npm run build
Publish to npm

npm publish --access public