next-text-editor
v1.0.1
Published
A reusable next text editor React component.
Downloads
9
Readme
RichTextEditor
A reusable next text editor React component.
Installation
npm install next-text-editorUsage
import NextTextEditor from 'next-text-editor';
function MyComponent() {
const [value, setValue] = useState('');
return (
<NextTextEditor value={value} onChange={setValue} placeholder="Type here..." />
);
}Props
value: string (HTML content)onChange: (value: string) => voidplaceholder?: string
Development
- Source:
src/NextTextEditor.tsx - Build:
npm run build(outputs todist/)
