pagemaster-editor 0.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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/docxExport-C4g0WBf1.js +14192 -0
- package/dist/favicon.ico +0 -0
- package/dist/html2canvas-DvGd-Pek.js +25 -0
- package/dist/index-Bi7532a5.js +89078 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es-CTn8zMre.js +5647 -0
- package/dist/pagemaster-editor.js +5 -0
- package/dist/pagemaster-editor.umd.cjs +967 -0
- package/dist/placeholder.svg +1 -0
- package/dist/purify.es-CP0Oxyr7.js +562 -0
- package/dist/robots.txt +14 -0
- package/dist/style.css +1 -0
- package/package.json +133 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 PageMaster Editor Contributors
|
|
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,97 @@
|
|
|
1
|
+
# PageMaster Editor
|
|
2
|
+
|
|
3
|
+
A powerful, DOCX-style rich text editor and PDF viewer for React applications. Built with Tiptap, React PDF, and generic document handling libraries.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### 📝 Advanced Document Editor
|
|
8
|
+
- **Rich Text Editing**: Full-featured editor with formatting, lists (bullet/numbered), tables, and alignment.
|
|
9
|
+
- **Visual Pagination**: Infinite scrolling with clear **A4 page indicators** (1300px height) and visual page separation.
|
|
10
|
+
- **Tables**: Create and manage tables with visible borders, hover effects, and row/column controls.
|
|
11
|
+
- **Lists**: Proper support for nested bullet and numbered lists.
|
|
12
|
+
|
|
13
|
+
### 🖼️ Image Manipulation
|
|
14
|
+
- **Resize**: Drag from any edge or corner to resize images while maintaining aspect ratio.
|
|
15
|
+
- **Toolbar Controls**: Dedicated floating toolbar for image settings.
|
|
16
|
+
- **Transformations**: Rotate (90°, 180°, 270°) and Flip (Horizontal/Vertical) images.
|
|
17
|
+
- **Text Wrapping**:
|
|
18
|
+
- **In Line**: Default behavior
|
|
19
|
+
- **Wrap Text**: Text flows around the image
|
|
20
|
+
- **Break Text**: Image takes full line width
|
|
21
|
+
- **Behind Text**: Image acts as a background/watermark
|
|
22
|
+
- **In Front of Text**: Image overlays content
|
|
23
|
+
- **Alignment**: Align images Left, Center, or Right.
|
|
24
|
+
|
|
25
|
+
### 📄 PDF Integration
|
|
26
|
+
- **Integrated Viewer**: Built-in tabbed interface to switch between Editor and PDF viewing modes.
|
|
27
|
+
- **PDF Upload**: Upload PDF files directly from the toolbar.
|
|
28
|
+
- **Advanced Controls**: Zoom (50%-300%), page navigation, and responsive rendering.
|
|
29
|
+
|
|
30
|
+
### 💾 Import & Export
|
|
31
|
+
- **DOCX Support**:
|
|
32
|
+
- **Import**: Load existing DOCX files for editing.
|
|
33
|
+
- **Export**: Generate distinct, browser-compatible DOCX files with improved formatting.
|
|
34
|
+
- **PDF Export**: Export your document content directly to PDF format.
|
|
35
|
+
|
|
36
|
+
### ⌨️ Keyboard Shortcuts
|
|
37
|
+
|
|
38
|
+
| Action | Shortcut (Mac) | Shortcut (Windows/Linux) |
|
|
39
|
+
|--------|----------------|--------------------------|
|
|
40
|
+
| **Bold** | `Cmd` + `B` | `Ctrl` + `B` |
|
|
41
|
+
| **Italic** | `Cmd` + `I` | `Ctrl` + `I` |
|
|
42
|
+
| **Underline** | `Cmd` + `U` | `Ctrl` + `U` |
|
|
43
|
+
| **Strike** | `Cmd` + `Shift` + `X` | `Ctrl` + `Shift` + `X` |
|
|
44
|
+
| **Highlight** | `Cmd` + `Shift` + `H` | `Ctrl` + `Shift` + `H` |
|
|
45
|
+
| **Code** | `Cmd` + `E` | `Ctrl` + `E` |
|
|
46
|
+
| **Undo** | `Cmd` + `Z` | `Ctrl` + `Z` |
|
|
47
|
+
| **Redo** | `Cmd` + `Shift` + `Z` | `Ctrl` + `Shift` + `Z` |
|
|
48
|
+
| **Bullet List** | `Cmd` + `Shift` + `8` | `Ctrl` + `Shift` + `8` |
|
|
49
|
+
| **Ordered List** | `Cmd` + `Shift` + `7` | `Ctrl` + `Shift` + `7` |
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install pagemaster-editor
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
### Document Editor with PDF Viewer
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import { DocumentEditor } from 'pagemaster-editor';
|
|
63
|
+
import 'pagemaster-editor/dist/style.css';
|
|
64
|
+
|
|
65
|
+
function App() {
|
|
66
|
+
return (
|
|
67
|
+
<div style={{ height: '100vh' }}>
|
|
68
|
+
<DocumentEditor />
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### PDF Viewer (Standalone)
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import { PDFViewer } from 'pagemaster-editor';
|
|
78
|
+
import 'pagemaster-editor/dist/style.css';
|
|
79
|
+
|
|
80
|
+
function App() {
|
|
81
|
+
return (
|
|
82
|
+
<div style={{ padding: '20px' }}>
|
|
83
|
+
<PDFViewer file="https://example.com/sample.pdf" />
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Peer Dependencies
|
|
90
|
+
|
|
91
|
+
Ensure you have the following installed in your project:
|
|
92
|
+
- `react`
|
|
93
|
+
- `react-dom`
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|