@lexion-rte/next 0.1.1 → 0.1.3
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/CHANGELOG.md +21 -0
- package/README.md +30 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @lexion-rte/next
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Release `0.1.3` with framework-native adapter samples and documentation alignment.
|
|
8
|
+
|
|
9
|
+
- Add runnable sample apps for each adapter package in `apps/*-sample`.
|
|
10
|
+
- Ensure adapter and extension docs use real framework code style (React JSX, Vue SFC, Vue 2 Options API, Angular component lifecycle, Svelte action/component usage, Solid JSX).
|
|
11
|
+
- Update guides and task tracking to reflect the full adapter sample matrix and framework-accurate examples.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @lexion-rte/react@0.1.3
|
|
15
|
+
|
|
16
|
+
## 0.1.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Refresh package metadata links and expand package-level README documentation.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @lexion-rte/react@0.1.2
|
|
23
|
+
|
|
3
24
|
## 0.1.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Next.js adapter for Lexion.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
`@lexion-rte/next` exports `LexionNextEditorView`,
|
|
7
|
+
`@lexion-rte/next` exports `LexionNextEditorView`, which wraps the React adapter as a client component.
|
|
8
|
+
|
|
9
|
+
This package is ideal for Next App Router and can also be used in Pages Router client components.
|
|
8
10
|
|
|
9
11
|
## Install
|
|
10
12
|
|
|
@@ -12,7 +14,7 @@ Next.js adapter for Lexion.
|
|
|
12
14
|
pnpm add @lexion-rte/next next react react-dom
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
##
|
|
17
|
+
## Basic Example
|
|
16
18
|
|
|
17
19
|
```tsx
|
|
18
20
|
"use client";
|
|
@@ -24,3 +26,28 @@ export default function EditorPage() {
|
|
|
24
26
|
}
|
|
25
27
|
```
|
|
26
28
|
|
|
29
|
+
## Controlled Example
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
"use client";
|
|
33
|
+
|
|
34
|
+
import { useState } from "react";
|
|
35
|
+
import type { JSONDocument } from "@lexion-rte/core";
|
|
36
|
+
import { LexionNextEditorView } from "@lexion-rte/next";
|
|
37
|
+
|
|
38
|
+
export default function EditorPage() {
|
|
39
|
+
const [value, setValue] = useState<JSONDocument | undefined>(undefined);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<LexionNextEditorView
|
|
43
|
+
value={value}
|
|
44
|
+
onChange={(nextValue) => setValue(nextValue)}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Notes
|
|
51
|
+
|
|
52
|
+
- Keep `"use client"` at the top of files that render the component.
|
|
53
|
+
- Component props are the same as `@lexion-rte/react` `LexionEditorViewProps`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexion-rte/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Next.js adapter for the Lexion editor.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@lexion-rte/react": "0.1.
|
|
42
|
+
"@lexion-rte/react": "0.1.3"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -p tsconfig.json",
|