slash-rich-text-editor
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

slash-rich-text-editor

A rich text editor base on HTML contenteditable

NPM JavaScript Style Guide

Install

npm install --save slash-rich-text-editor

Usage

import React, { useState } from 'react'

import EditablePage, { BlockModel } from 'slash-rich-text-editor'
import 'slash-rich-text-editor/dist/index.css'

const Example = () => {
  const [value, setValue] = useState<BlockModel[]>([
    { id: 'default', html: 'Default paragraph', tag: 'p' }
  ])
  return (
    <EditablePage
      value={value}
      onChange={(result: BlockModel[]) => setValue(result)}
    />
  )
}

License

MIT © maiducthang279

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i slash-rich-text-editor

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

87.7 kB

Total Files

13

Last publish

Collaborators

  • maiducthang279