0.0.10 • Published 6 years ago

maby-editor v0.0.10

Weekly downloads
11
License
ISC
Repository
github
Last release
6 years ago

maby-editor

安装

npm install maby-editor --save

示例

import React, { Component } from 'react';
import MabyEditor from 'maby-editor';
export default class Example extends Component {
  state = {
    value: null
  }
  onChange = ({ value }) => {
    this.setState({ value })
  }
  handleSubmit = (value) => {
    console.log('value---->', value);
  }
  render() {
    const { value } = this.state;
    const mabyEditProps = {
      value: value,
      onChange: this.onChange,
      handleValue: this.handleSubmit
    };
    return (
      <div>
        <h2>测试maby-edit</h2>
        <MabyEdit {...mabyEditProps} />
      </div>
    );
  }
}

还很不完善...