draft-js-test

1.0.1 • Public • Published

draft-js-plus test

가이드

<TestDraftJsPlus />
// KEY BINDING EXAMPLE
onHeaderOne = () => {
    this.onChange(RichUtils.toggleBlockType(this.state.editorState, 'header-one'))
}
 
onHeaderTwo = () => {
    this.onChange(RichUtils.toggleBlockType(this.state.editorState, 'header-two'))
}
 
onHeaderThree = () => {
    this.onChange(RichUtils.toggleBlockType(this.state.editorState, 'header-three'))
}
 
onHeaderFour = () => {
    this.onChange(RichUtils.toggleBlockType(this.state.editorState, 'header-four'))
}
 
onHeaderFive = () => {
    this.onChange(RichUtils.toggleBlockType(this.state.editorState, 'header-five'))
}
 
onBold = () => {
    this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, 'BOLD'));
}
 
onUnderlineClick = () => {
    this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, 'UNDERLINE'));
}
 
onToggleCode = () => {
    this.onChange(RichUtils.toggleCode(this.state.editorState));
}
 
onResetStyle = () => {
    this.onChange(RichUtils.tryToRemoveBlockStyle(this.state.editorState));
}

===

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i draft-js-test

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

32.2 kB

Total Files

7

Last publish

Collaborators

  • sykim1009