@shadospace/editor 1.0.1 → 1.0.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/README.md +53 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,21 +1,53 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# @shadospace/editor
|
|
2
|
+
|
|
3
|
+
A beautiful, feature-rich Tiptap editor scaffolding for Next.js projects using shadcn/ui.
|
|
4
|
+
|
|
5
|
+
This is not just a component library; it's a CLI scaffolding tool that places the editor source files directly into your project so you can customize them fully.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Tiptap Starter Kit** fully integrated.
|
|
10
|
+
- **Dynamic Menu Bar** with essential formatting tools.
|
|
11
|
+
- **Tailwind CSS** styling pre-configured.
|
|
12
|
+
- **Interactive States** and clean UI.
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
Before installing, ensure your project meets the following requirements:
|
|
17
|
+
|
|
18
|
+
1. **Next.js** project.
|
|
19
|
+
2. **shadcn/ui** initialized (requires a `components.json` file in the root).
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
Install the package as a dependency. The installation will automatically trigger the setup script.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
bun add @shadospace/editor
|
|
27
|
+
# or
|
|
28
|
+
npm install @shadospace/editor
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
The package automatically detects your project structure (with or without a `src` folder) and places files in `components/editor/`. It also references the stylesheet in your global CSS file.
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
After installation, the component files will be copied into your project. You can import and use the editor like this (adjust the path if you use a different alias):
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import Editor from "@/components/editor";
|
|
41
|
+
|
|
42
|
+
export default function Page() {
|
|
43
|
+
return (
|
|
44
|
+
<div className="container mx-auto p-6">
|
|
45
|
+
<Editor />
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Customization
|
|
52
|
+
|
|
53
|
+
Since the editor files are copied directly into your project, you can edit them anytime to add new features or change the styling.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shadospace/editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"lint": "eslint",
|
|
18
18
|
"format": "prettier --write \"**/*.{ts,tsx}\"",
|
|
19
19
|
"typecheck": "tsc --noEmit",
|
|
20
|
-
"postinstall": "
|
|
20
|
+
"postinstall": "node scripts/init.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@hookform/resolvers": "^5.2.2",
|