3.3.0 • Published 5 months ago

jodit-inferno v3.3.0

Weekly downloads
-
License
NCSA
Repository
github
Last release
5 months ago

jodit-inferno

Inferno wrapper for Jodit WYSIWYG editor

Usage

import { Component, createRef } from 'inferno'

import JoditEditor from './JoditEditor'

class NewPage extends Component {
  constructor (props) {
    super(props)

    this.editor = createRef()
    this.state = {
      value: ''
    }

    this.handleBlur = this.handleBlur.bind(this)
    this.handleClick = this.handleClick.bind(this)
  }

  handleBlur (newValue) {
    this.setState({ value: newValue })
  }

  handleClick () {
    if (this.editor.current) {
      console.log(this.state.value)
    }
  }

  render () {
    return (
      <div>
        <button type='button' onClick={this.handleClick}>log</button>
        <JoditEditor ref={this.editor} value={this.state.value} onBlur={this.handleBlur} />
      </div>
    )
  }
}

export default NewPage
3.3.0

5 months ago

3.2.0

6 months ago

3.1.0

6 months ago

1.2.0

8 months ago

1.1.0

8 months ago