pagemaster-editor 0.3.5 → 0.3.7

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 CHANGED
@@ -1,10 +1,12 @@
1
- # Aditily
1
+ # Pagemaster Editor
2
2
 
3
3
  A powerful, DOCX-style rich text editor and PDF viewer for React applications. Built with Tiptap, React PDF, and modern styling libraries.
4
4
 
5
- [![NPM Version](https://img.shields.io/npm/v/aditily.svg)](https://www.npmjs.com/package/aditily)
5
+ [![NPM Version](https://img.shields.io/npm/v/pagemaster-editor.svg)](https://www.npmjs.com/package/pagemaster-editor)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
+ **[🔥 Live Demo](https://pagemaster-demo-app.vercel.app/)**
9
+
8
10
  ## Features
9
11
 
10
12
  ### 📝 Advanced Document Editor
@@ -54,7 +56,7 @@ A powerful, DOCX-style rich text editor and PDF viewer for React applications. B
54
56
  ## Installation
55
57
 
56
58
  ```bash
57
- npm install aditily
59
+ npm install pagemaster-editor
58
60
  ```
59
61
 
60
62
  ## Usage
@@ -64,14 +66,16 @@ npm install aditily
64
66
  Import the component and its baseline styles. Ensure the parent container has a height.
65
67
 
66
68
  ```tsx
67
- import { DocumentEditor } from 'aditily';
68
- import 'aditily/dist/style.css';
69
+ import { DocumentEditor } from 'pagemaster-editor';
70
+ import 'pagemaster-editor/dist/style.css';
69
71
 
70
72
  function App() {
73
+ const llmResponse = "# Welcome to Pagemaster Editor\n\nThis content is generated from **Markdown**!";
74
+
71
75
  return (
72
76
  <div style={{ height: '100vh', width: '100vw' }}>
73
77
  <DocumentEditor
74
- initialContent="<h1>Welcome to Aditily</h1>"
78
+ initialContent={llmResponse}
75
79
  onChange={(html) => console.log('Content updated:', html)}
76
80
  />
77
81
  </div>
@@ -79,18 +83,28 @@ function App() {
79
83
  }
80
84
  ```
81
85
 
86
+ ### Using Markdown Content
87
+
88
+ The editor automatically detects if `initialContent` is Markdown and converts it to rich HTML. This is perfect for displaying content from LLMs (AI) or CMS APIs.
89
+
90
+ ```tsx
91
+ <DocumentEditor
92
+ initialContent="## Generated Report\n\n- Point 1\n- Point 2"
93
+ />
94
+ ```
95
+
82
96
  ### Next.js Integration (SSR)
83
97
 
84
- Since Aditily uses browser-specific APIs (Canvas, DOM), it must be imported dynamically.
98
+ Since Pagemaster Editor uses browser-specific APIs (Canvas, DOM), it must be imported dynamically.
85
99
 
86
100
  ```tsx
87
101
  "use client";
88
102
 
89
103
  import dynamic from 'next/dynamic';
90
- import 'aditily/dist/style.css';
104
+ import 'pagemaster-editor/dist/style.css';
91
105
 
92
106
  const DocumentEditor = dynamic(
93
- () => import('aditily').then((mod) => mod.DocumentEditor),
107
+ () => import('pagemaster-editor').then((mod) => mod.DocumentEditor),
94
108
  {
95
109
  ssr: false,
96
110
  loading: () => <div>Loading Editor...</div>
@@ -104,14 +118,14 @@ export default function Page() {
104
118
 
105
119
  ### Tailwind CSS Configuration
106
120
 
107
- Aditily uses Tailwind for styling. To ensure all library styles are properly purged/generated in your project:
121
+ Pagemaster Editor uses Tailwind for styling. To ensure all library styles are properly purged/generated in your project:
108
122
 
109
123
  #### Tailwind v3 (tailwind.config.js)
110
124
  ```javascript
111
125
  module.exports = {
112
126
  content: [
113
127
  "./src/**/*.{js,ts,jsx,tsx}",
114
- "./node_modules/aditily/dist/**/*.{js,ts,jsx,tsx}",
128
+ "./node_modules/pagemaster-editor/dist/**/*.{js,ts,jsx,tsx}",
115
129
  ],
116
130
  theme: {
117
131
  extend: {},
@@ -123,10 +137,10 @@ module.exports = {
123
137
  #### Tailwind v4 (globals.css)
124
138
  ```css
125
139
  @import "tailwindcss";
126
- @import "aditily/style";
140
+ @import "pagemaster-editor/style";
127
141
 
128
142
  /* Ensure Tailwind scans the library for utility classes */
129
- @source "../../node_modules/aditily/dist/**/*.{js,ts,jsx,tsx}";
143
+ @source "../../node_modules/pagemaster-editor/dist/**/*.{js,ts,jsx,tsx}";
130
144
  ```
131
145
 
132
146
  ## Props
@@ -135,7 +149,7 @@ The `DocumentEditor` component accepts the following props:
135
149
 
136
150
  | Prop | Type | Default | Description |
137
151
  |------|------|---------|-------------|
138
- | `initialContent` | `string` | `""` | Initial HTML string to load into the editor. |
152
+ | `initialContent` | `string` | `""` | Initial HTML string or **Markdown** to load into the editor. |
139
153
  | `className` | `string` | `""` | Additional CSS classes for the outer container. |
140
154
  | `onChange` | `(html: string) => void` | `undefined` | Callback function triggered on every content change. |
141
155
  | `readOnly` | `boolean` | `false` | If true, the editor is disabled and toolbars are hidden. |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pagemaster-editor",
3
3
  "private": false,
4
- "version": "0.3.5",
4
+ "version": "0.3.7",
5
5
  "description": "A powerful, DOCX-style rich text editor and PDF viewer for React applications.",
6
6
  "keywords": [
7
7
  "react",