neuphlo-editor 1.3.0 → 1.3.2
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 +4 -3
- package/package.json +11 -9
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ A lightweight, feature-rich React wrapper around [Tiptap](https://tiptap.dev) wi
|
|
|
12
12
|
- 📐 **Image controls** - Resize and align images with intuitive controls
|
|
13
13
|
- ⌨️ **Slash commands** - Quick formatting with `/` commands
|
|
14
14
|
- 💬 **Bubble menus** - Context-aware formatting menus
|
|
15
|
+
- 🧩 **Expandable menus** - Add your own controls to the text or image menus
|
|
15
16
|
- 🎯 **TypeScript** - Full TypeScript support with type definitions
|
|
16
17
|
- 🎨 **Syntax highlighting** - Code blocks with highlight.js support
|
|
17
18
|
- 🔗 **Link management** - Easy link insertion and editing
|
|
@@ -228,7 +229,7 @@ const handleImageUpload = async (file: File): Promise<string> => {
|
|
|
228
229
|
| `showImageMenu` | `boolean` | `true` | Show image controls bubble menu |
|
|
229
230
|
| `showSlashMenu` | `boolean` | `true` | Show slash command menu |
|
|
230
231
|
| `extensions` | `Extension[]` | `[]` | Additional Tiptap extensions |
|
|
231
|
-
| `bubbleMenuExtras` | `{ text?: BubbleMenuExtra \| BubbleMenuExtra[]; image?: BubbleMenuExtra \| BubbleMenuExtra[] }` | `undefined` |
|
|
232
|
+
| `bubbleMenuExtras` | `{ text?: BubbleMenuExtra \| BubbleMenuExtra[]; image?: BubbleMenuExtra \| BubbleMenuExtra[] }` | `undefined` | Expand text/image bubble menus with custom UI |
|
|
232
233
|
| `uploadImage` | `(file: File) => Promise<string>` | `undefined` | Image upload handler |
|
|
233
234
|
| `onUpdate` | `({ editor }) => void` | `undefined` | Called when content changes |
|
|
234
235
|
| `onCreate` | `({ editor }) => void` | `undefined` | Called when editor is created |
|
|
@@ -254,9 +255,9 @@ const handleImageUpload = async (file: File): Promise<string> => {
|
|
|
254
255
|
/>
|
|
255
256
|
```
|
|
256
257
|
|
|
257
|
-
###
|
|
258
|
+
### Expandable Menus
|
|
258
259
|
|
|
259
|
-
|
|
260
|
+
Both the text and image bubble menus can expand with custom controls. Pass the `bubbleMenuExtras` prop when you need to sprinkle in project-specific actions (AI helpers, analytics buttons, etc.) without editing this package.
|
|
260
261
|
|
|
261
262
|
```tsx
|
|
262
263
|
import type { Editor } from "@tiptap/react"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neuphlo-editor",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A lightweight React wrapper around Tiptap with sensible defaults and image upload support.",
|
|
6
6
|
"type": "module",
|
|
@@ -39,6 +39,15 @@
|
|
|
39
39
|
"dist",
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsup src/index.ts src/react/index.ts src/react/core.ts src/headless/index.ts --format esm,cjs --dts --sourcemap && pnpm run copy:css",
|
|
44
|
+
"dev": "tsup src/index.ts src/react/index.ts src/react/core.ts src/headless/index.ts --format esm,cjs --dts --sourcemap --watch",
|
|
45
|
+
"copy:css": "mkdir -p dist && cp src/styles.css dist/styles.css && cp src/highlight.css dist/highlight.css",
|
|
46
|
+
"prepack": "pnpm run build",
|
|
47
|
+
"prepare": "pnpm run build",
|
|
48
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
49
|
+
"lint": "eslint . --ext .ts,.tsx"
|
|
50
|
+
},
|
|
42
51
|
"peerDependencies": {
|
|
43
52
|
"@tiptap/pm": ">=3",
|
|
44
53
|
"@tiptap/react": ">=3",
|
|
@@ -70,12 +79,5 @@
|
|
|
70
79
|
"jotai": "^2.11.0",
|
|
71
80
|
"lowlight": "^3.3.0",
|
|
72
81
|
"tunnel-rat": "^0.1.2"
|
|
73
|
-
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"build": "tsup src/index.ts src/react/index.ts src/react/core.ts src/headless/index.ts --format esm,cjs --dts --sourcemap && pnpm run copy:css",
|
|
76
|
-
"dev": "tsup src/index.ts src/react/index.ts src/react/core.ts src/headless/index.ts --format esm,cjs --dts --sourcemap --watch",
|
|
77
|
-
"copy:css": "mkdir -p dist && cp src/styles.css dist/styles.css && cp src/highlight.css dist/highlight.css",
|
|
78
|
-
"typecheck": "tsc -p tsconfig.json",
|
|
79
|
-
"lint": "eslint . --ext .ts,.tsx"
|
|
80
82
|
}
|
|
81
|
-
}
|
|
83
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Neuphlo
|
|
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.
|