@crashbytes/contentful-richtext-editor 2.0.6 → 3.0.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/README.md CHANGED
@@ -1,16 +1,34 @@
1
1
  # @crashbytes/contentful-richtext-editor
2
2
 
3
- A modern, Tiptap-based rich text editor that's fully compatible with Contentful's rich text format. Provides the same editing experience as Contentful's native editor while maintaining perfect compatibility with Contentful's document structure.
3
+ [![npm version](https://img.shields.io/npm/v/@crashbytes/contentful-richtext-editor.svg)](https://www.npmjs.com/package/@crashbytes/contentful-richtext-editor)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@crashbytes/contentful-richtext-editor.svg)](https://www.npmjs.com/package/@crashbytes/contentful-richtext-editor)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![Security Audit](https://github.com/CrashBytes/contentful-richtext-editor/actions/workflows/security-audit.yml/badge.svg)](https://github.com/CrashBytes/contentful-richtext-editor/actions/workflows/security-audit.yml)
7
+ [![React Compatibility](https://github.com/CrashBytes/contentful-richtext-editor/actions/workflows/react-compat.yml/badge.svg)](https://github.com/CrashBytes/contentful-richtext-editor/actions/workflows/react-compat.yml)
8
+ [![npm package provenance](https://img.shields.io/badge/provenance-tracked-brightgreen)](https://www.npmjs.com/package/@crashbytes/contentful-richtext-editor)
9
+
10
+ A modern, Tiptap v3-based rich text editor that's fully compatible with Contentful's rich text format. Provides the same editing experience as Contentful's native editor while maintaining perfect compatibility with Contentful's document structure.
11
+
12
+ ## 🔒 Security & Trust
13
+
14
+ - ✅ **Zero Known Vulnerabilities** - Automated security audits via Dependabot
15
+ - ✅ **Supply Chain Security** - Package published with npm provenance via Trusted Publishing
16
+ - ✅ **CodeQL Analysis** - Continuous security scanning for vulnerabilities
17
+ - ✅ **React 18 & 19 Compatible** - Automated compatibility testing
18
+ - ✅ **Dependency Review** - Automated PR checks for vulnerable dependencies
19
+
20
+ See our [Security Policy](SECURITY.md) for vulnerability reporting.
4
21
 
5
22
  ## ✨ Features
6
23
 
7
24
  - ✅ **Full Contentful Compatibility** - Seamless conversion between Contentful and Tiptap formats
25
+ - ✅ **Tiptap v3** - Built on the latest Tiptap v3 for better performance
8
26
  - ✅ **Modern UI** - Clean, intuitive interface matching Contentful's design
9
27
  - ✅ **TypeScript Support** - Complete type safety with Contentful's rich text types
10
- - ✅ **Extensible** - Built on Tiptap v2 for easy customization
28
+ - ✅ **Extensible** - Built on Tiptap v3 for easy customization
11
29
  - ✅ **Lightweight** - Tree-shakeable, only import what you need
12
30
  - ✅ **Responsive** - Works on desktop and mobile devices
13
- - ✅ **Optional Border Control** - Customize editor appearance with `showBorder` prop _(New in v2.0.4)_
31
+ - ✅ **Optional Border Control** - Customize editor appearance with `showBorder` prop
14
32
 
15
33
  ## 🚀 Installation
16
34
 
@@ -18,6 +36,10 @@ A modern, Tiptap-based rich text editor that's fully compatible with Contentful'
18
36
  npm install @crashbytes/contentful-richtext-editor
19
37
  ```
20
38
 
39
+ **Peer Dependencies:**
40
+ - React 18.3.1+ or React 19.x
41
+ - React DOM 18.3.1+ or React 19.x
42
+
21
43
  ## 📖 Quick Start
22
44
 
23
45
  ```tsx
@@ -50,7 +72,7 @@ function App() {
50
72
  export default App;
51
73
  ```
52
74
 
53
- ## 🎨 Border Control (New in v2.0.4)
75
+ ## 🎨 Border Control
54
76
 
55
77
  Control the editor's border appearance with the `showBorder` prop:
56
78
 
@@ -147,7 +169,7 @@ function ContentfulEditor() {
147
169
 
148
170
  | Prop | Type | Default | Description |
149
171
  |------|------|---------|-------------|
150
- | `showBorder` | `boolean` | `true` | Control editor border visibility _(New in v2.0.4)_ |
172
+ | `showBorder` | `boolean` | `true` | Control editor border visibility |
151
173
  | `initialValue` | `Document` | `undefined` | Initial Contentful rich text document |
152
174
  | `onChange` | `(document: Document) => void` | `undefined` | Callback when content changes |
153
175
  | `onEmbedEntry` | `() => Promise<any> \| void` | `undefined` | Callback for embedding Contentful entries |
@@ -290,17 +312,49 @@ import type {
290
312
 
291
313
  ## 🔄 Migration
292
314
 
293
- ### From v2.0.3 to v2.0.4
294
- No breaking changes! Simply update and optionally use the new `showBorder` prop:
315
+ ### From v2.x to v3.0.0
295
316
 
296
- ```tsx
297
- // Before
298
- <ContentfulRichTextEditor />
317
+ **Good News:** The public API is unchanged! Upgrade with no code changes:
299
318
 
300
- // After (optional)
301
- <ContentfulRichTextEditor showBorder={false} />
319
+ ```bash
320
+ npm install @crashbytes/contentful-richtext-editor@latest
302
321
  ```
303
322
 
323
+ Your existing code continues to work:
324
+
325
+ ```tsx
326
+ // This still works exactly the same
327
+ <ContentfulRichTextEditor
328
+ placeholder="Start writing..."
329
+ onChange={handleChange}
330
+ initialValue={content}
331
+ />
332
+ ```
333
+
334
+ **What Changed:** Internal upgrade to Tiptap v3 provides:
335
+ - Better performance
336
+ - Improved mobile support
337
+ - Enhanced transaction handling
338
+ - More efficient rendering
339
+
340
+ See [CHANGELOG.md](CHANGELOG.md) for complete details.
341
+
342
+ ### From v2.0.3 to v2.0.4+
343
+ No breaking changes! Simply update and optionally use the new `showBorder` prop.
344
+
345
+ ## 🔒 Security
346
+
347
+ We take security seriously. This package:
348
+
349
+ - ✅ **Automated Security Audits** - Weekly npm audit via GitHub Actions
350
+ - ✅ **Dependabot** - Automated dependency updates for security patches
351
+ - ✅ **CodeQL Analysis** - Advanced security vulnerability scanning
352
+ - ✅ **Dependency Review** - Automated checks on every PR
353
+ - ✅ **Trusted Publishing** - Package published with cryptographic provenance
354
+ - ✅ **Supply Chain Verification** - npm provenance proves package source
355
+
356
+ **Found a vulnerability?** Please report it via our [Security Policy](SECURITY.md).
357
+
304
358
  ## 🤝 Contributing
305
359
 
306
360
  Contributions are welcome! Please feel free to submit a Pull Request.
@@ -311,6 +365,12 @@ Contributions are welcome! Please feel free to submit a Pull Request.
311
365
  4. Push to the branch (`git push origin feature/amazing-feature`)
312
366
  5. Open a Pull Request
313
367
 
368
+ All PRs automatically run:
369
+ - Security audits
370
+ - Dependency vulnerability checks
371
+ - React 18 & 19 compatibility tests
372
+ - Full test suite (175 tests)
373
+
314
374
  ## 📄 License
315
375
 
316
376
  MIT © [CrashBytes](https://github.com/CrashBytes)
@@ -319,16 +379,17 @@ MIT © [CrashBytes](https://github.com/CrashBytes)
319
379
 
320
380
  - [@contentful/rich-text-react-renderer](https://www.npmjs.com/package/@contentful/rich-text-react-renderer) - For rendering Contentful rich text
321
381
  - [@contentful/rich-text-types](https://www.npmjs.com/package/@contentful/rich-text-types) - Contentful rich text type definitions
322
- - [@tiptap/react](https://www.npmjs.com/package/@tiptap/react) - The underlying editor framework
382
+ - [@tiptap/react](https://www.npmjs.com/package/@tiptap/react) - The underlying editor framework (v3)
323
383
 
324
384
  ## 📈 Version History
325
385
 
386
+ - **v3.0.0** - Upgraded to Tiptap v3.15.3, added security enhancements
387
+ - **v2.0.6** - Dependency updates, bug fixes
326
388
  - **v2.0.4** - Added optional border control with `showBorder` prop
327
389
  - **v2.0.3** - Package made publicly accessible
328
- - **v2.0.2** - Previous release
329
390
  - **v2.0.0** - Major feature update with automatic configuration
330
391
  - **v1.x** - Initial releases
331
392
 
332
393
  ---
333
394
 
334
- Made with ❤️ for the Contentful community
395
+ Made with ❤️ for the Contentful community