@anilkumarteach/editor-ak 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/README.md +86 -45
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,73 +1,114 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @anilkumarteach/editor-ak
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A modern **Rich Text Editor for React**, built with **TypeScript** and **Vite**.
|
|
4
|
+
This package exposes a **single, clean component**: `<RichTextEditor />`.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
It is designed to be easy to install, simple to use, and production-ready.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
---
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## 📌 What is this package?
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
`@anilkumarteach/editor-ak` provides a ready-to-use rich text editor that you can plug into any React app without configuring complex editor logic.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
You only import **one component** and start using it.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
---
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
## ✨ Features (Step by Step)
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
### 1️⃣ Rich Text Editing
|
|
21
|
+
- Write and edit formatted text
|
|
22
|
+
- Supports paragraphs and headings
|
|
23
|
+
- Clean HTML output
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
---
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
### 2️⃣ Formatting Toolbar
|
|
28
|
+
- Bold, italic, underline formatting
|
|
29
|
+
- Heading selection (H1–H6)
|
|
30
|
+
- Context-aware toolbar
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
# Step 1: Clone the repository using the project's Git URL.
|
|
27
|
-
git clone <YOUR_GIT_URL>
|
|
32
|
+
---
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
### 3️⃣ Links
|
|
35
|
+
- Add and edit links
|
|
36
|
+
- Link dialog with validation
|
|
37
|
+
- Safe URL handling
|
|
31
38
|
|
|
32
|
-
|
|
33
|
-
npm i
|
|
39
|
+
---
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
### 4️⃣ Images
|
|
42
|
+
- Image upload support
|
|
43
|
+
- Resizable images
|
|
44
|
+
- Image alignment controls
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
---
|
|
40
47
|
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
48
|
+
### 5️⃣ Tables
|
|
49
|
+
- Insert tables
|
|
50
|
+
- Add / remove rows and columns
|
|
51
|
+
- Table-specific controls
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
---
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- Edit files directly within the Codespace and commit and push your changes once you're done.
|
|
55
|
+
### 6️⃣ Autosave
|
|
56
|
+
- Automatically saves content
|
|
57
|
+
- Prevents data loss
|
|
58
|
+
- Runs internally (no setup required)
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
---
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
### 7️⃣ Undo / Redo History
|
|
63
|
+
- Editor version history
|
|
64
|
+
- Safe undo and redo actions
|
|
56
65
|
|
|
57
|
-
|
|
58
|
-
- TypeScript
|
|
59
|
-
- React
|
|
60
|
-
- shadcn-ui
|
|
61
|
-
- Tailwind CSS
|
|
66
|
+
---
|
|
62
67
|
|
|
63
|
-
|
|
68
|
+
### 8️⃣ Markdown Shortcuts
|
|
69
|
+
- Faster writing using keyboard shortcuts
|
|
70
|
+
- Markdown-style formatting support
|
|
64
71
|
|
|
65
|
-
|
|
72
|
+
---
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
### 9️⃣ Responsive Design
|
|
75
|
+
- Works on desktop and mobile
|
|
76
|
+
- Touch-friendly UI
|
|
68
77
|
|
|
69
|
-
|
|
78
|
+
---
|
|
70
79
|
|
|
71
|
-
|
|
80
|
+
### 🔒 Clean API Design
|
|
81
|
+
- Only **one public component**
|
|
82
|
+
- All complex logic is internal
|
|
83
|
+
- Easy to maintain and upgrade
|
|
72
84
|
|
|
73
|
-
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 📦 Installation
|
|
88
|
+
|
|
89
|
+
Install the package using npm:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm install @anilkumarteach/editor-ak
|
|
93
|
+
|
|
94
|
+
or with yarn:
|
|
95
|
+
|
|
96
|
+
yarn add @anilkumarteach/editor-ak
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
import "@anilkumarteach/editor-ak/dist/index.css";
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
import { RichTextEditor } from "@anilkumarteach/editor-ak";
|
|
104
|
+
import "@anilkumarteach/editor-ak/dist/index.css";
|
|
105
|
+
|
|
106
|
+
function App() {
|
|
107
|
+
return (
|
|
108
|
+
<div style={{ padding: "20px" }}>
|
|
109
|
+
<RichTextEditor />
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export default App;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anilkumarteach/editor-ak",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -18,5 +18,8 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@vitejs/plugin-react": "^5.1.2",
|
|
20
20
|
"vite": "^7.3.0"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@anilkumarteach/editor-ak": "file:anilkumarteach-editor-ak-0.1.1.tgz"
|
|
21
24
|
}
|
|
22
25
|
}
|