@malva-ui/editor 0.1.12 → 0.1.13

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -0
  3. package/package.json +16 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Malva UI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # @malva-ui/editor
2
+
3
+ Rich-text editor for [Malva UI](https://www.npmjs.com/package/@malva-ui/core) — an SSR-safe Angular shell around a single browser-only [Tiptap](https://tiptap.dev) instance.
4
+
5
+ Ships as its own package so applications that never render an editor never pull in Tiptap: every `@tiptap/*` peer lives here, not in `@malva-ui/core`.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @malva-ui/editor
11
+ ```
12
+
13
+ Tiptap is a peer dependency set, so install it alongside:
14
+
15
+ ```bash
16
+ npm install @tiptap/core @tiptap/pm @tiptap/starter-kit @tiptap/extensions @tiptap/markdown @tiptap/extension-file-handler @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-table @tiptap/extension-text-align @tiptap/extension-text-style
17
+ ```
18
+
19
+ ## Quick start
20
+
21
+ ```ts
22
+ import { MlvEditor } from '@malva-ui/editor';
23
+
24
+ @Component({ imports: [MlvEditor] })
25
+ export class ReleaseNotes {
26
+ readonly value = signal<string | null>('<p>Hello</p>');
27
+ }
28
+ ```
29
+
30
+ ```html
31
+ <mlv-editor [(value)]="value" label="Release notes" ariaLabel="Release notes editor" />
32
+ ```
33
+
34
+ ## Value formats
35
+
36
+ `format` selects what the two-way `value` model holds:
37
+
38
+ | `format` | `value` shape |
39
+ | ------------ | --------------------------------- |
40
+ | `'html'` | HTML string (default) |
41
+ | `'markdown'` | Markdown string |
42
+ | `'json'` | Serialised Tiptap JSON document |
43
+
44
+ ```html
45
+ <mlv-editor [(value)]="markdown" format="markdown" />
46
+ ```
47
+
48
+ `value` is nullable — setting it to `null` clears the document.
49
+
50
+ ## Features
51
+
52
+ - Composable extension presets, or pass your own via `extensions`
53
+ - Replaceable command toolbar
54
+ - Image uploads with an upload-placeholder extension
55
+ - Block drag reordering via a block handle
56
+ - Server-side rendering safe: Tiptap is only constructed in the browser
57
+
58
+ ## AI toolkit
59
+
60
+ `@malva-ui/editor/ai` adds an optional AI surface — an action menu, a streaming transform contract, and an inline suggestion/review bar with word-level diffs:
61
+
62
+ ```ts
63
+ import { MlvEditorAiMenu, MLV_EDITOR_AI_CONTEXT } from '@malva-ui/editor/ai';
64
+ ```
65
+
66
+ You supply the model call; the package owns the editing UX around it.
67
+
68
+ ## Peer dependencies
69
+
70
+ `@angular/cdk`, `@angular/common`, `@angular/core`, `@angular/forms`, `@lucide/angular`, `rxjs`, `@malva-ui/core`, `@malva-ui/cdk`, `@malva-ui/i18n`, and the twelve `@tiptap/*` packages listed above.
71
+
72
+ ## Related packages
73
+
74
+ - [`@malva-ui/core`](https://www.npmjs.com/package/@malva-ui/core) — the component library
75
+ - [`@malva-ui/cdk`](https://www.npmjs.com/package/@malva-ui/cdk) — headless primitives
76
+ - [`@malva-ui/i18n`](https://www.npmjs.com/package/@malva-ui/i18n) — localisation
77
+
78
+ ## License
79
+
80
+ MIT
package/package.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "name": "@malva-ui/editor",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
+ "description": "SSR-safe Angular rich-text editor for Malva UI — a Tiptap shell with HTML/Markdown/JSON values, image uploads and block reordering.",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "angular",
8
+ "editor",
9
+ "rich-text",
10
+ "wysiwyg",
11
+ "tiptap",
12
+ "prosemirror",
13
+ "markdown",
14
+ "malva-ui"
15
+ ],
4
16
  "publishConfig": {
5
17
  "access": "public"
6
18
  },
@@ -10,9 +22,9 @@
10
22
  "@angular/core": "22.0.7",
11
23
  "@angular/forms": "22.0.7",
12
24
  "@lucide/angular": "^1.25.0",
13
- "@malva-ui/cdk": "0.1.12",
14
- "@malva-ui/core": "0.1.12",
15
- "@malva-ui/i18n": "0.1.12",
25
+ "@malva-ui/cdk": "0.1.13",
26
+ "@malva-ui/core": "0.1.13",
27
+ "@malva-ui/i18n": "0.1.13",
16
28
  "@tiptap/core": "3.29.2",
17
29
  "@tiptap/extension-file-handler": "3.29.2",
18
30
  "@tiptap/extension-highlight": "3.29.2",