nextgen-block-editor 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,33 @@
1
- # Temporary Holding Version
1
+ # nextgen-block-editor
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A modular, block-based React + TypeScript rich text editor built on Editor.js with 20+ blocks including Bento grids, Image Carousels, Before/After comparison sliders, Lightbox galleries, Slide decks, Tabs, Accordions, Toggle headings, Pull-quotes, Timelines, Stats, Pros & Cons, Alerts, Badges, Tags, `@mention`, and more.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install nextgen-block-editor
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { useState } from 'react';
15
+ import { BlockEditor, BlockRenderer, type EditorJSData } from 'nextgen-block-editor';
16
+ import 'nextgen-block-editor/styles.css';
17
+
18
+ export function MyEditorPage() {
19
+ const [data, setData] = useState<EditorJSData>({ blocks: [] });
20
+
21
+ return (
22
+ <div>
23
+ <BlockEditor
24
+ initialData={data}
25
+ onChange={setData}
26
+ linkEndpoint="/api/fetchUrl"
27
+ gifEndpoint="/api/gifs"
28
+ />
29
+ <BlockRenderer data={data} />
30
+ </div>
31
+ );
32
+ }
33
+ ```