@richhtmleditor/angular 1.0.0 → 1.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,157 +1,165 @@
|
|
|
1
|
-
# @richhtmleditor/angular
|
|
2
|
-
|
|
3
|
-
Angular standalone component for Rich HTML Editor, built on [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core). WYSIWYG authoring with toolbar presets, `ControlValueAccessor` for reactive forms, and plugin support for enterprise AI, comments, and workflows.
|
|
4
|
-
|
|
5
|
-
**Current release: 1.
|
|
6
|
-
|
|
7
|
-
**Repository:** [github.com/rajkishorsahu89/richhtmleditor](https://github.com/rajkishorsahu89/richhtmleditor)
|
|
8
|
-
|
|
9
|
-
**Demo:** [richhtmleditor.vercel.app](https://richhtmleditor.vercel.app/) — [demo](https://richhtmleditor.vercel.app/demo) · [guide](https://richhtmleditor.vercel.app/guide) · [API](https://richhtmleditor.vercel.app/api). Doc Preview joint demo: [doc-preview-app.vercel.app/demo/enterprise](https://doc-preview-app.vercel.app/demo/enterprise)
|
|
10
|
-
|
|
11
|
-
### What's in 1.
|
|
12
|
-
|
|
13
|
-
- **`RichHtmlEditorComponent`** — selector `richhtmleditor`; mounts `createEditor` on init
|
|
14
|
-
- **`ControlValueAccessor`** — bind with `[(ngModel)]` or `formControlName` (HTML string value)
|
|
15
|
-
- **Toolbar & features** — `[toolbar]`, `[features]`, `[plugins]` mirror core `CreateEditorOptions`
|
|
16
|
-
- **Events** — `(contentChange)` and `(save)` emit `EditorContent` (`html` + `json`)
|
|
17
|
-
- Re-exports all public symbols from `@richhtmleditor/core`
|
|
18
|
-
|
|
19
|
-
> Ships as ESM with TypeScript declarations. Works with **Angular 19+**, **20**, and **21** (`@angular/core` ^19 \|\| ^20 \|\| ^21). Import [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) CSS in `angular.json` or global styles.
|
|
20
|
-
|
|
21
|
-
**Keywords:** `richhtmleditor` `angular` `standalone` `wysiwyg` `rich-text-editor` `forms`
|
|
22
|
-
|
|
23
|
-
## Install
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install @richhtmleditor/angular @richhtmleditor/themes
|
|
27
|
-
# Adds @richhtmleditor/core automatically.
|
|
28
|
-
# Peer deps: @angular/core ^19 || ^20 || ^21.
|
|
29
|
-
# Optional enterprise plugins:
|
|
30
|
-
npm install @richhtmleditor/enterprise @richhtmleditor/ai @richhtmleditor/comments @richhtmleditor/workflows
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Usage — component
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
// app.component.ts
|
|
37
|
-
import { Component } from "@angular/core";
|
|
38
|
-
import { RichHtmlEditorComponent } from "@richhtmleditor/angular";
|
|
39
|
-
|
|
40
|
-
@Component({
|
|
41
|
-
selector: "app-root",
|
|
42
|
-
standalone: true,
|
|
43
|
-
imports: [RichHtmlEditorComponent],
|
|
44
|
-
template: `
|
|
45
|
-
<richhtmleditor
|
|
46
|
-
[toolbar]="{ preset: 'standard' }"
|
|
47
|
-
[content]="html"
|
|
48
|
-
(contentChange)="html = $event.html"
|
|
49
|
-
/>
|
|
50
|
-
`
|
|
51
|
-
})
|
|
52
|
-
export class AppComponent {
|
|
53
|
-
html = "<p>Hello <strong>world</strong></p>";
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Add styles once in `angular.json`:
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
"styles": ["node_modules/@richhtmleditor/themes/richhtmleditor.css"]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Usage — reactive forms
|
|
64
|
-
|
|
65
|
-
```html
|
|
66
|
-
<richhtmleditor
|
|
67
|
-
formControlName="body"
|
|
68
|
-
[toolbar]="'standard'"
|
|
69
|
-
[features]="features"
|
|
70
|
-
/>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
import { FormControl, ReactiveFormsModule } from "@angular/forms";
|
|
75
|
-
import type { EditorFeatureFlags } from "@richhtmleditor/angular";
|
|
76
|
-
|
|
77
|
-
features: EditorFeatureFlags = { tables: true, media: true };
|
|
78
|
-
body = new FormControl("<p>Draft content</p>");
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Usage — enterprise plugins
|
|
82
|
-
|
|
83
|
-
```ts
|
|
84
|
-
import { createAiPlugin } from "@richhtmleditor/ai";
|
|
85
|
-
import { createCommentsPlugin } from "@richhtmleditor/comments";
|
|
86
|
-
import { createWorkflowsPlugin } from "@richhtmleditor/workflows";
|
|
87
|
-
import { resolveEnterpriseFeatures } from "@richhtmleditor/enterprise/browser";
|
|
88
|
-
|
|
89
|
-
const gate = resolveEnterpriseFeatures({ token: "RHE-ENT-DEMO-2026-FULL" });
|
|
90
|
-
|
|
91
|
-
plugins = [
|
|
92
|
-
createAiPlugin({ onGenerate: async (req) => callYourLlm(req) }),
|
|
93
|
-
createCommentsPlugin({ author: "Reviewer" }),
|
|
94
|
-
createWorkflowsPlugin({ actor: "Legal", role: "editor" })
|
|
95
|
-
];
|
|
96
|
-
features = gate.features;
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
```html
|
|
100
|
-
<richhtmleditor
|
|
101
|
-
[features]="features"
|
|
102
|
-
[plugins]="plugins"
|
|
103
|
-
[toolbar]="{ preset: 'full' }"
|
|
104
|
-
/>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Demo key (documentation only): `RHE-ENT-DEMO-2026-FULL`
|
|
108
|
-
|
|
109
|
-
## API
|
|
110
|
-
|
|
111
|
-
### `RichHtmlEditorComponent` inputs
|
|
112
|
-
|
|
113
|
-
| Input | Type | Description |
|
|
114
|
-
| --- | --- | --- |
|
|
115
|
-
| `content` | `string` | Initial HTML (also set via `writeValue` / `ngModel`). |
|
|
116
|
-
| `editable` | `boolean` | Enable editing (default `true`). |
|
|
117
|
-
| `dark` | `boolean` | Dark theme tokens. |
|
|
118
|
-
| `theme` | `EditorThemeTokens` | Custom CSS variable overrides. |
|
|
119
|
-
| `toolbar` | `ToolbarConfig \| ToolbarPresetId` | Toolbar preset or custom layout. |
|
|
120
|
-
| `features` | `EditorFeatureFlags` | Feature gates (tables, AI, comments, workflows, …). |
|
|
121
|
-
| `plugins` | `EditorPlugin[]` | Enterprise and custom plugins. |
|
|
122
|
-
| `toolMounts` | `CreateEditorOptions["toolMounts"]` | Per-tool custom DOM mounts. |
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
| `
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
| `(
|
|
138
|
-
| `
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
- [`@richhtmleditor/
|
|
148
|
-
- [`@richhtmleditor/
|
|
149
|
-
- [`@richhtmleditor/
|
|
150
|
-
- [`@richhtmleditor/
|
|
151
|
-
- [`@richhtmleditor/
|
|
152
|
-
- [`@richhtmleditor/
|
|
153
|
-
- [`@richhtmleditor/
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
[
|
|
1
|
+
# @richhtmleditor/angular
|
|
2
|
+
|
|
3
|
+
Angular standalone component for Rich HTML Editor, built on [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core). WYSIWYG authoring with toolbar presets, `ControlValueAccessor` for reactive forms, and plugin support for enterprise AI, comments, and workflows.
|
|
4
|
+
|
|
5
|
+
**Current release: 1.1.0** — Depends on `@richhtmleditor/core` **^1.1.0**.
|
|
6
|
+
|
|
7
|
+
**Repository:** [github.com/rajkishorsahu89/richhtmleditor](https://github.com/rajkishorsahu89/richhtmleditor)
|
|
8
|
+
|
|
9
|
+
**Demo:** [richhtmleditor.vercel.app](https://richhtmleditor.vercel.app/) — [demo](https://richhtmleditor.vercel.app/demo) · [guide](https://richhtmleditor.vercel.app/guide) · [API](https://richhtmleditor.vercel.app/api). Doc Preview joint demo: [doc-preview-app.vercel.app/demo/enterprise](https://doc-preview-app.vercel.app/demo/enterprise)
|
|
10
|
+
|
|
11
|
+
### What's in 1.1.0
|
|
12
|
+
|
|
13
|
+
- **`RichHtmlEditorComponent`** — selector `richhtmleditor`; mounts `createEditor` on init
|
|
14
|
+
- **`ControlValueAccessor`** — bind with `[(ngModel)]` or `formControlName` (HTML string value)
|
|
15
|
+
- **Toolbar & features** — `[toolbar]`, `[features]`, `[plugins]` mirror core `CreateEditorOptions`
|
|
16
|
+
- **Events** — `(contentChange)` and `(save)` emit `EditorContent` (`html` + `json`)
|
|
17
|
+
- Re-exports all public symbols from `@richhtmleditor/core`
|
|
18
|
+
|
|
19
|
+
> Ships as ESM with TypeScript declarations. Works with **Angular 19+**, **20**, and **21** (`@angular/core` ^19 \|\| ^20 \|\| ^21). Import [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) CSS in `angular.json` or global styles.
|
|
20
|
+
|
|
21
|
+
**Keywords:** `richhtmleditor` `angular` `standalone` `wysiwyg` `rich-text-editor` `forms`
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install @richhtmleditor/angular @richhtmleditor/themes
|
|
27
|
+
# Adds @richhtmleditor/core automatically.
|
|
28
|
+
# Peer deps: @angular/core ^19 || ^20 || ^21.
|
|
29
|
+
# Optional enterprise plugins:
|
|
30
|
+
npm install @richhtmleditor/enterprise @richhtmleditor/ai @richhtmleditor/comments @richhtmleditor/workflows
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage — component
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
// app.component.ts
|
|
37
|
+
import { Component } from "@angular/core";
|
|
38
|
+
import { RichHtmlEditorComponent } from "@richhtmleditor/angular";
|
|
39
|
+
|
|
40
|
+
@Component({
|
|
41
|
+
selector: "app-root",
|
|
42
|
+
standalone: true,
|
|
43
|
+
imports: [RichHtmlEditorComponent],
|
|
44
|
+
template: `
|
|
45
|
+
<richhtmleditor
|
|
46
|
+
[toolbar]="{ preset: 'standard' }"
|
|
47
|
+
[content]="html"
|
|
48
|
+
(contentChange)="html = $event.html"
|
|
49
|
+
/>
|
|
50
|
+
`
|
|
51
|
+
})
|
|
52
|
+
export class AppComponent {
|
|
53
|
+
html = "<p>Hello <strong>world</strong></p>";
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Add styles once in `angular.json`:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
"styles": ["node_modules/@richhtmleditor/themes/richhtmleditor.css"]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Usage — reactive forms
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<richhtmleditor
|
|
67
|
+
formControlName="body"
|
|
68
|
+
[toolbar]="'standard'"
|
|
69
|
+
[features]="features"
|
|
70
|
+
/>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { FormControl, ReactiveFormsModule } from "@angular/forms";
|
|
75
|
+
import type { EditorFeatureFlags } from "@richhtmleditor/angular";
|
|
76
|
+
|
|
77
|
+
features: EditorFeatureFlags = { tables: true, media: true };
|
|
78
|
+
body = new FormControl("<p>Draft content</p>");
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Usage — enterprise plugins
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { createAiPlugin } from "@richhtmleditor/ai";
|
|
85
|
+
import { createCommentsPlugin } from "@richhtmleditor/comments";
|
|
86
|
+
import { createWorkflowsPlugin } from "@richhtmleditor/workflows";
|
|
87
|
+
import { resolveEnterpriseFeatures } from "@richhtmleditor/enterprise/browser";
|
|
88
|
+
|
|
89
|
+
const gate = resolveEnterpriseFeatures({ token: "RHE-ENT-DEMO-2026-FULL" });
|
|
90
|
+
|
|
91
|
+
plugins = [
|
|
92
|
+
createAiPlugin({ onGenerate: async (req) => callYourLlm(req) }),
|
|
93
|
+
createCommentsPlugin({ author: "Reviewer" }),
|
|
94
|
+
createWorkflowsPlugin({ actor: "Legal", role: "editor" })
|
|
95
|
+
];
|
|
96
|
+
features = gate.features;
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```html
|
|
100
|
+
<richhtmleditor
|
|
101
|
+
[features]="features"
|
|
102
|
+
[plugins]="plugins"
|
|
103
|
+
[toolbar]="{ preset: 'full' }"
|
|
104
|
+
/>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Demo key (documentation only): `RHE-ENT-DEMO-2026-FULL`
|
|
108
|
+
|
|
109
|
+
## API
|
|
110
|
+
|
|
111
|
+
### `RichHtmlEditorComponent` inputs
|
|
112
|
+
|
|
113
|
+
| Input | Type | Description |
|
|
114
|
+
| --- | --- | --- |
|
|
115
|
+
| `content` | `string` | Initial HTML (also set via `writeValue` / `ngModel`). |
|
|
116
|
+
| `editable` | `boolean` | Enable editing (default `true`). |
|
|
117
|
+
| `dark` | `boolean` | Dark theme tokens. |
|
|
118
|
+
| `theme` | `EditorThemeTokens` | Custom CSS variable overrides. |
|
|
119
|
+
| `toolbar` | `ToolbarConfig \| ToolbarPresetId` | Toolbar preset or custom layout. |
|
|
120
|
+
| `features` | `EditorFeatureFlags` | Feature gates (tables, AI, comments, workflows, …). |
|
|
121
|
+
| `plugins` | `EditorPlugin[]` | Enterprise and custom plugins. |
|
|
122
|
+
| `toolMounts` | `CreateEditorOptions["toolMounts"]` | Per-tool custom DOM mounts. |
|
|
123
|
+
| `autoSave` | `boolean \| string` | Enable localStorage auto-save with optional key. |
|
|
124
|
+
|
|
125
|
+
### `RichHtmlEditorComponent` outputs
|
|
126
|
+
|
|
127
|
+
| Output | Type | Description |
|
|
128
|
+
| --- | --- | --- |
|
|
129
|
+
| `contentChange` | `EditorContent` | Emitted on every document edit (`html` + `json`). |
|
|
130
|
+
| `save` | `EditorContent` | Emitted when the user triggers save. |
|
|
131
|
+
|
|
132
|
+
### Angular vs React naming
|
|
133
|
+
|
|
134
|
+
| Angular | React |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| `<richhtmleditor>` | `<RichHtmlEditor />` |
|
|
137
|
+
| `(contentChange)` | `onChange` |
|
|
138
|
+
| `(save)` | `onSave` |
|
|
139
|
+
| `[content]` | `content` |
|
|
140
|
+
|
|
141
|
+
## Browser support
|
|
142
|
+
|
|
143
|
+
Requires a modern browser with `contentEditable`, `Selection`, and `fetch`. Mount `<richhtmleditor>` only in the browser for SSR (e.g. `afterNextRender` or `@if (isBrowser)`).
|
|
144
|
+
|
|
145
|
+
## Related packages
|
|
146
|
+
|
|
147
|
+
- [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core) — framework-agnostic engine (auto-installed).
|
|
148
|
+
- [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) — shared CSS.
|
|
149
|
+
- [`@richhtmleditor/enterprise`](https://www.npmjs.com/package/@richhtmleditor/enterprise) — licence tokens and feature flags.
|
|
150
|
+
- [`@richhtmleditor/ai`](https://www.npmjs.com/package/@richhtmleditor/ai) — AI authoring plugin.
|
|
151
|
+
- [`@richhtmleditor/comments`](https://www.npmjs.com/package/@richhtmleditor/comments) — review comments plugin.
|
|
152
|
+
- [`@richhtmleditor/workflows`](https://www.npmjs.com/package/@richhtmleditor/workflows) — approval workflows plugin.
|
|
153
|
+
- [`@richhtmleditor/react`](https://www.npmjs.com/package/@richhtmleditor/react) — React component on the same core.
|
|
154
|
+
- [`@richhtmleditor/vue`](https://www.npmjs.com/package/@richhtmleditor/vue) — Vue 3 component on the same core.
|
|
155
|
+
- [`@richhtmleditor/collab`](https://www.npmjs.com/package/@richhtmleditor/collab) — Yjs collaboration plugin.
|
|
156
|
+
- [`@richhtmleditor/diagrams`](https://www.npmjs.com/package/@richhtmleditor/diagrams) — Mermaid diagrams plugin.
|
|
157
|
+
- [`@richhtmleditor/math`](https://www.npmjs.com/package/@richhtmleditor/math) — LaTeX/MathML equation plugin.
|
|
158
|
+
- [`@richhtmleditor/export`](https://www.npmjs.com/package/@richhtmleditor/export) — DOCX/PDF/HTML export plugin.
|
|
159
|
+
- [`@richhtmleditor/spellcheck`](https://www.npmjs.com/package/@richhtmleditor/spellcheck) — real-time spell check plugin.
|
|
160
|
+
- [`@richhtmleditor/templates`](https://www.npmjs.com/package/@richhtmleditor/templates) — document templates plugin.
|
|
161
|
+
- [`@richhtmleditor/mentions`](https://www.npmjs.com/package/@richhtmleditor/mentions) — @ mentions plugin.
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
[MIT](./LICENSE)
|
|
@@ -12,6 +12,7 @@ export declare class RichHtmlEditorComponent implements ControlValueAccessor, Af
|
|
|
12
12
|
features?: EditorFeatureFlags;
|
|
13
13
|
plugins?: EditorPlugin[];
|
|
14
14
|
toolMounts?: CreateEditorOptions["toolMounts"];
|
|
15
|
+
autoSave?: boolean | string;
|
|
15
16
|
contentChange: EventEmitter<EditorContent>;
|
|
16
17
|
save: EventEmitter<EditorContent>;
|
|
17
18
|
private editor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richhtmleditor.component.d.ts","sourceRoot":"","sources":["../src/richhtmleditor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAIb,UAAU,EACV,YAAY,EAEZ,SAAS,EACT,SAAS,EAET,aAAa,EAId,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAA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AAe,CAAC;IAC1C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B,aAAa,8BAAqC;IAClD,IAAI,8BAAqC;IAEnD,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,UAAU,CAAqC;IACvD,OAAO,CAAC,WAAW,CAAwB;IAE3C,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAOtC,gBAAgB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAInD,iBAAiB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IAIvC,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAK3C,eAAe,IAAI,IAAI;IAKvB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IA4BzC,WAAW,IAAI,IAAI;IAKnB,OAAO,CAAC,WAAW;IA4BnB,OAAO,CAAC,aAAa;CAKtB"}
|
|
@@ -78,6 +78,7 @@ let RichHtmlEditorComponent = class RichHtmlEditorComponent {
|
|
|
78
78
|
features: this.features,
|
|
79
79
|
plugins: this.plugins,
|
|
80
80
|
toolMounts: this.toolMounts,
|
|
81
|
+
autoSave: this.autoSave,
|
|
81
82
|
onChange: (value) => {
|
|
82
83
|
this.contentChange.emit(value);
|
|
83
84
|
this.onChangeFn(value.html);
|
|
@@ -124,6 +125,9 @@ __decorate([
|
|
|
124
125
|
__decorate([
|
|
125
126
|
Input()
|
|
126
127
|
], RichHtmlEditorComponent.prototype, "toolMounts", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
Input()
|
|
130
|
+
], RichHtmlEditorComponent.prototype, "autoSave", void 0);
|
|
127
131
|
__decorate([
|
|
128
132
|
Output()
|
|
129
133
|
], RichHtmlEditorComponent.prototype, "contentChange", void 0);
|
|
@@ -144,11 +148,11 @@ RichHtmlEditorComponent = __decorate([
|
|
|
144
148
|
],
|
|
145
149
|
template: `<div class="de-angular-host"><div #mount></div></div>`,
|
|
146
150
|
styles: [
|
|
147
|
-
`
|
|
148
|
-
.de-angular-host {
|
|
149
|
-
display: block;
|
|
150
|
-
min-height: 280px;
|
|
151
|
-
}
|
|
151
|
+
`
|
|
152
|
+
.de-angular-host {
|
|
153
|
+
display: block;
|
|
154
|
+
min-height: 280px;
|
|
155
|
+
}
|
|
152
156
|
`
|
|
153
157
|
]
|
|
154
158
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richhtmleditor.component.js","sourceRoot":"","sources":["../src/richhtmleditor.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EAET,YAAY,EACZ,KAAK,EAGL,MAAM,EAEN,SAAS,EACT,UAAU,EACV,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAwB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,YAAY,EASb,MAAM,sBAAsB,CAAC;AAuBvB,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAA7B;QACY,QAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAKxC,aAAQ,GAAG,IAAI,CAAC;QAChB,SAAI,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"richhtmleditor.component.js","sourceRoot":"","sources":["../src/richhtmleditor.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EAET,YAAY,EACZ,KAAK,EAGL,MAAM,EAEN,SAAS,EACT,UAAU,EACV,MAAM,EACP,MAAM,eAAe,CAA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AuC;AAEnE;IAAR,KAAK,EAAE;wDAAkB;AACjB;IAAR,KAAK,EAAE;yDAAiB;AAChB;IAAR,KAAK,EAAE;qDAAc;AACb;IAAR,KAAK,EAAE;sDAA2B;AAC1B;IAAR,KAAK,EAAE;wDAA2C;AAC1C;IAAR,KAAK,EAAE;yDAA+B;AAC9B;IAAR,KAAK,EAAE;wDAA0B;AACzB;IAAR,KAAK,EAAE;2DAAgD;AAC/C;IAAR,KAAK,EAAE;yDAA6B;AAE3B;IAAT,MAAM,EAAE;8DAAmD;AAClD;IAAT,MAAM,EAAE;qDAA0C;AAhBxC,uBAAuB;IArBnC,SAAS,CAAC;QACT,QAAQ,EAAE,gBAAgB;QAC1B,UAAU,EAAE,IAAI;QAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;gBACtD,KAAK,EAAE,IAAI;aACZ;SACF;QACD,QAAQ,EAAE,uDAAuD;QACjE,MAAM,EAAE;YACN;;;;;KAKC;SACF;KACF,CAAC;GACW,uBAAuB,CAmHnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@richhtmleditor/angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Angular wrapper for Rich HTML Editor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"prepack": "node ../../scripts/assert-pack-ready.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@richhtmleditor/core": "^1.
|
|
24
|
+
"@richhtmleditor/core": "^1.1.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0"
|