项目作者: chungchiehlun

项目描述 :
Make any text editable.
高级语言: TypeScript
项目地址: git://github.com/chungchiehlun/react-click-to-edit.git
创建时间: 2017-09-29T15:01:17Z
项目社区:https://github.com/chungchiehlun/react-click-to-edit

开源协议:MIT License

下载


React-Click-To-Edit

Add it to your component including text such as label, article and table and make the text editable.

Installation

  1. $ npm install react-click-to-edit
  2. or
  3. $ yarn add react-click-to-edit

Usage

  1. // ESM
  2. import CTE from "react-click-to-edit";
  3. or;
  4. // Commonjs
  5. const CTE = require("react-click-to-edit");
props type usage
wrapperClass string css class applied to the wrapper (or container) consists of input and text
inputClass string css class applied to the input
textClass string css class applied to the text
initialValue string initial value of text
startEditing () => {} callback invoked when entering edit mode by clicking the text
endEditing (value) => {} callback invoked when leaving edit mode by clicking ENTER or ESC

See elaborate examples

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT