@reacteditor/core 0.0.19 → 0.0.20
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 +5 -6
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ React Editor is [licensed under MIT](https://github.com/reacteditor/editor?tab=M
|
|
|
11
11
|
Install the package:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
npm i @reacteditor/core --save # or npx create-react-editor my-app
|
|
14
|
+
npm i @reacteditor/core --save # or npx create-react-editor-app my-app
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Render the editor:
|
|
@@ -43,8 +43,8 @@ const initialData = {};
|
|
|
43
43
|
// Save the data to your database
|
|
44
44
|
const save = (data) => {};
|
|
45
45
|
|
|
46
|
-
// Render React Editor
|
|
47
|
-
export function
|
|
46
|
+
// Render React Editor
|
|
47
|
+
export function App() {
|
|
48
48
|
return <Editor config={config} data={initialData} onPublish={save} />;
|
|
49
49
|
}
|
|
50
50
|
```
|
|
@@ -63,16 +63,15 @@ export function Page() {
|
|
|
63
63
|
|
|
64
64
|
## Recipes
|
|
65
65
|
|
|
66
|
-
Use `create-react-editor` to quickly spin up a a pre-configured app based on our provided [recipes](https://github.com/reacteditor/editor/tree/main/recipes):
|
|
66
|
+
Use `create-react-editor-app` to quickly spin up a a pre-configured app based on our provided [recipes](https://github.com/reacteditor/editor/tree/main/recipes):
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
|
-
npx create-react-editor my-app
|
|
69
|
+
npx create-react-editor-app my-app
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
Available recipes include:
|
|
73
73
|
|
|
74
74
|
- [**next**](https://github.com/reacteditor/editor/tree/main/recipes/next): Next.js example, using App Router and static page generation
|
|
75
|
-
- [**remix**](https://github.com/reacteditor/editor/tree/main/recipes/remix): Remix Run v2 example, using dynamic routes at root-level
|
|
76
75
|
- [**react-router**](https://github.com/reacteditor/editor/tree/main/recipes/react-router): React Router v7 app example, using dynamic routes to create pages at any level
|
|
77
76
|
|
|
78
77
|
## Get support
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reacteditor/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "The open-source visual editor for React",
|
|
5
5
|
"author": "Frontend AI, Inc.",
|
|
6
6
|
"repository": "reacteditor/editor",
|
|
@@ -152,5 +152,10 @@
|
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"react": "^18.0.0 || ^19.0.0",
|
|
154
154
|
"react-router": "^7.0.0"
|
|
155
|
+
},
|
|
156
|
+
"peerDependenciesMeta": {
|
|
157
|
+
"react-router": {
|
|
158
|
+
"optional": true
|
|
159
|
+
}
|
|
155
160
|
}
|
|
156
161
|
}
|