@planview/pv-editor
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@planview/pv-editor

React implementation of Planview Design System Rich Text Editor following the specification.

This package enables rich text editing in a unified way for Planview products. It is a wrapper around TipTap and ProseMirror.

Setup

You can install @planview/pv-editor in multiple ways:

NPM

npm install @planview/pv-editor --save

Yarn

yarn add @planview/pv-editor

Usage

Due to the underlying technology being used, the Editor only runs in uncontrolled mode. To update the content after it has mounted, you can use the EditorApi exposed via the ref.

import { Editor } from '@planview/pv-editor'

const MyView = () => {
    const [currentValue, setCurrentValue] = React.useState()

    return (
        <Editor
            defaultValue="<p>Hello world!</p>"
            onReady={(editor) => {
                setCurrentValue(editor.getValue())
            }}
            onChange={(editor) => {
                setCurrentValue(editor.getValue())
            }}
        />
    )
}

Package Sidebar

Install

npm i @planview/pv-editor

Weekly Downloads

346

Version

1.1.0

License

BSD-3-Clause

Unpacked Size

1.45 MB

Total Files

1029

Last publish

Collaborators

  • dougneiner
  • mikiz2000
  • dwikmans
  • olled
  • gaganm
  • peterengstedt
  • pgoagent