1.0.6 • Published 4 years ago
typeface-editor v1.0.6
Typeface

Typeface is a fast, lightweight and easy to use rich text editor package for react.js You can checkout a live demo here
Features
- Add responsive images and videos
- Change font colour
- View and edit html for your text
- provide a custom label and description to your editor
Installation
Install using npm
npm install --save typeface-editorParameters
| Parameter | Value | Required |
|---|---|---|
| getdata | Function | Required |
| value | String | Optional |
| options | Array of strings | Optional |
| label | String | Optional |
| description | String | Optional |
| theme | String | Optional |
Options
const optionalData = [
"blockquote",
"video",
"code",
]Usage
import React,{ useState } from "react"
import Typeface from "typeface-editor"
function App() {
const [data,setData] = useState("");
const additionalOptions = [
"blockquote",
"video",
"code",
]
return (
<div>
<Typeface
options={additionalOptions}
label="Typeface Editor Demo"
description="rich text editor for react"
theme='#FFCA41'
value = "<h1>Hello World</h1>"
getdata={(value)=>setData(value)}
/>
</div>
)
}