1.0.16 • Published 7 years ago

react-squire-editor v1.0.16

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

react-squire-editor

this package is a react version of Squire editor(an rich text editor),

it has two simple function:

  • use content props to set the html content to the editor.

  • use onchange function to get the html content form the editor.

Demo:

click here to check demo

Usage:

npm install react-squire-editor

in your component:

import React from 'react';
import ReactDOM from 'react-dom';
import Editor from 'react-squire-editor';

const app = document.getElementById('app');

const editorOptions = {
  uploadAction: 'http://youruploadApi?action=uploadimage&encode=utf-8',
  uploadFileName: 'filename',
  uploadData: { type: '1' },
}
function handleChange(value) {
  console.log(value)
}
ReactDOM.render(
  <Editor options={editorOptions} content={''} onChange={handleChange} />,
app);
1.0.16

7 years ago

1.0.15

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.4.0

7 years ago