@lexion-rte/angular 0.1.0 → 0.1.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/CHANGELOG.md +14 -0
- package/README.md +40 -0
- package/package.json +6 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @lexion-rte/angular
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update package metadata and documentation for the `@lexion-rte` package set.
|
|
8
|
+
|
|
9
|
+
- Align repository/homepage/bugs metadata with the current GitHub repository owner.
|
|
10
|
+
- Add package-level README files with package purpose and usage examples.
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @lexion-rte/core@0.1.1
|
|
14
|
+
- @lexion-rte/web@0.1.1
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @lexion-rte/angular
|
|
2
|
+
|
|
3
|
+
Angular adapter utilities for Lexion.
|
|
4
|
+
|
|
5
|
+
## What It Is
|
|
6
|
+
|
|
7
|
+
`@lexion-rte/angular` provides `createLexionAngularAdapter` to attach/detach the editor and bridge value/touched callbacks.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @lexion-rte/angular @angular/core @angular/forms
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { AfterViewInit, Component, ElementRef, OnDestroy, ViewChild } from "@angular/core";
|
|
19
|
+
import { createLexionAngularAdapter } from "@lexion-rte/angular";
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: "app-editor",
|
|
23
|
+
template: `<div #editorHost></div>`
|
|
24
|
+
})
|
|
25
|
+
export class EditorComponent implements AfterViewInit, OnDestroy {
|
|
26
|
+
@ViewChild("editorHost", { static: true })
|
|
27
|
+
private editorHost!: ElementRef<HTMLElement>;
|
|
28
|
+
|
|
29
|
+
private readonly adapter = createLexionAngularAdapter();
|
|
30
|
+
|
|
31
|
+
ngAfterViewInit(): void {
|
|
32
|
+
this.adapter.attach(this.editorHost.nativeElement);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ngOnDestroy(): void {
|
|
36
|
+
this.adapter.destroy();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexion-rte/angular",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Angular adapter utilities for the Lexion editor.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"license": "GPL-3.0-only",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/dariusve/lexion.git",
|
|
19
19
|
"directory": "packages/angular"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "https://github.com/
|
|
21
|
+
"homepage": "https://github.com/dariusve/lexion/tree/main/packages/angular",
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/
|
|
23
|
+
"url": "https://github.com/dariusve/lexion/issues"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"lexion",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@lexion-rte/core": "0.1.
|
|
42
|
-
"@lexion-rte/web": "0.1.
|
|
41
|
+
"@lexion-rte/core": "0.1.1",
|
|
42
|
+
"@lexion-rte/web": "0.1.1"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -p tsconfig.json",
|