@hawk-ui/rich-text-editor

2.11.7 • Public • Published

Installation

To install a component run

$ npm install @hawk-ui/rich-text-editor --save

Please import CSS styles via

@import '/path__to__node_modules/@hawk-ui/rich-text-editor/dist/index.min.css

Usage

Rich Text Editor

Demo

import RichTextEditor from '@hawk-ui/rich-text-editor';
initialState = {
  body: '',
};

<RichTextEditor
  toolbarClass="toolbar"
  editableClass="editable"
  editableId="containerEditable1"
  placeholder="Click here to start typing"
  toolbarItems={[
    'bold', 'italic', 'underline', 'link', 'unlink', 'strike through', 'ordered list'
    , 'unordered list', 'formatblock', 'cut', 'copy', 'print', 'pre', 'header', 'font family'
    , 'font size', 'select all', 'text color picker', 'background color picker', 'remove format', 'clean', 'divider', 'left justify'
    , 'center justify', 'right justify', 'outdent', 'indent', 'undo', 'redo'
  ]}
  htmlAttributes={{
    rows: '10',
  }}
  value={state.body}
  onChange={({ html, text }) => {
    setState({ body: html });
  }}
/>

Package Sidebar

Install

npm i @hawk-ui/rich-text-editor@2.11.7

Version

2.11.7

License

MIT

Unpacked Size

77.4 kB

Total Files

22

Last publish

Collaborators

  • saurabh2112