@vizel/react 0.0.1-alpha.1
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 +90 -0
- package/dist/index.d.ts +965 -0
- package/dist/index.js +60 -0
- package/dist/index10.js +7 -0
- package/dist/index11.js +179 -0
- package/dist/index12.js +24 -0
- package/dist/index13.js +79 -0
- package/dist/index14.js +11 -0
- package/dist/index15.js +81 -0
- package/dist/index16.js +118 -0
- package/dist/index17.js +38 -0
- package/dist/index18.js +8 -0
- package/dist/index19.js +71 -0
- package/dist/index2.js +26 -0
- package/dist/index20.js +94 -0
- package/dist/index21.js +7 -0
- package/dist/index22.js +39 -0
- package/dist/index23.js +36 -0
- package/dist/index24.js +53 -0
- package/dist/index25.js +32 -0
- package/dist/index26.js +10 -0
- package/dist/index27.js +55 -0
- package/dist/index28.js +14 -0
- package/dist/index29.js +5 -0
- package/dist/index3.js +13 -0
- package/dist/index30.js +23 -0
- package/dist/index31.js +4 -0
- package/dist/index32.js +9744 -0
- package/dist/index33.js +17018 -0
- package/dist/index34.js +4 -0
- package/dist/index35.js +10 -0
- package/dist/index36.js +4 -0
- package/dist/index37.js +4 -0
- package/dist/index38.js +224 -0
- package/dist/index39.js +227 -0
- package/dist/index4.js +56 -0
- package/dist/index40.js +4 -0
- package/dist/index41.js +4 -0
- package/dist/index5.js +57 -0
- package/dist/index6.js +52 -0
- package/dist/index7.js +28 -0
- package/dist/index8.js +63 -0
- package/dist/index9.js +91 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @vizel/react
|
|
2
|
+
|
|
3
|
+
React components for Vizel block-based Markdown editor.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @vizel/react @vizel/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- React 19+
|
|
14
|
+
- React DOM 19+
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### Basic Setup
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Vizel } from "@vizel/react";
|
|
22
|
+
import "@vizel/core/styles.css";
|
|
23
|
+
|
|
24
|
+
function App() {
|
|
25
|
+
return <Vizel />;
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### With Editor Control
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { VizelEditor, VizelBubbleMenu, useVizelEditor } from "@vizel/react";
|
|
33
|
+
import "@vizel/core/styles.css";
|
|
34
|
+
|
|
35
|
+
function App() {
|
|
36
|
+
const editor = useVizelEditor();
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<>
|
|
40
|
+
<VizelEditor editor={editor.current} />
|
|
41
|
+
<VizelBubbleMenu editor={editor.current} />
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Markdown Import/Export
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { useVizelEditor, useVizelMarkdown } from "@vizel/react";
|
|
51
|
+
|
|
52
|
+
function App() {
|
|
53
|
+
const editor = useVizelEditor();
|
|
54
|
+
const { getMarkdown, setMarkdown } = useVizelMarkdown(() => editor.current);
|
|
55
|
+
|
|
56
|
+
const handleExport = () => {
|
|
57
|
+
const markdown = getMarkdown();
|
|
58
|
+
console.log(markdown);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return <VizelEditor editor={editor.current} />;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Components
|
|
66
|
+
|
|
67
|
+
| Component | Description |
|
|
68
|
+
|-----------|-------------|
|
|
69
|
+
| `Vizel` | All-in-one editor with bubble menu |
|
|
70
|
+
| `VizelEditor` | Editor component |
|
|
71
|
+
| `VizelBubbleMenu` | Floating formatting toolbar |
|
|
72
|
+
| `VizelSlashMenu` | Slash command menu |
|
|
73
|
+
| `VizelIconProvider` | Custom icon provider |
|
|
74
|
+
|
|
75
|
+
## Hooks
|
|
76
|
+
|
|
77
|
+
| Hook | Description |
|
|
78
|
+
|------|-------------|
|
|
79
|
+
| `useVizelEditor` | Create and manage editor instance |
|
|
80
|
+
| `useVizelMarkdown` | Markdown import/export |
|
|
81
|
+
| `useVizelAutoSave` | Auto-save functionality |
|
|
82
|
+
| `useVizelState` | Editor state management |
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
See the [main repository](https://github.com/seijikohara/vizel) for full documentation.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|