1.1.16 • Published 2 years ago

publy-editor v1.1.16

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Publy Editor

NPM version Build npm-typescriptLicense]github-license-url

A rich text editor for Publy co. services

Live Demo

Installation:

npm install publy-editor --save-dev

or

yarn add -D publy-editor

Basic Usage :

Add PublyEditor to your component:

// react 18
import React from 'react'
import ReactDOM from 'react-dom/client'
import { PublyEditor, PublyEditorContextProvider } from 'publy-editor'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
    <React.StrictMode>
      <PublyEditorContextProvider>
        <PublyEditor editorType='tiptap'/>
      </PublyEditorContextProvider>
    </React.StrictMode>,
)

// < react 18
import React from 'react';
import ReactDOM from 'react-dom';
import { PublyEditor } from 'publy-editor';

ReactDOM.render(
    <React.StrictMode>
      <PublyEditorContextProvider>
        <PublyEditor editorType='tiptap'/>
      </PublyEditorContextProvider>
    </React.StrictMode>,
  document.getElementById('root'),
);