cms-block-editor 1.0.14 → 1.0.17

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
@@ -19,6 +19,7 @@ A powerful, feature-rich block editor for CMS applications built with Lexical an
19
19
  📊 **Tables** - Visual table builder with configurable rows/columns and professional styling
20
20
  🎨 **Styling** - Background colors, images, gradients, opacity controls
21
21
  🌈 **Themes** - 10 preset themes with light/dark mode and custom theme support
22
+ 🔍 **SEO Tools** - Complete SEO optimization with meta tags, structured data, and analysis
22
23
  📱 **Responsive** - Mobile-first design with automatic responsive behavior
23
24
  💾 **Export/Import** - HTML and Markdown support
24
25
  🎯 **Section Editor** - Full control over section layout, spacing, and styling
@@ -79,6 +80,9 @@ Main editor component with full editing capabilities.
79
80
  - `onImageAdded?: (file: File) => Promise<string>` - Custom image upload handler that returns the image URL
80
81
  - `onVideoAdded?: (file: File) => Promise<string>` - Custom video upload handler that returns the video URL
81
82
  - `useBase64Url?: boolean` - Use base64 encoding for images (default: `true`)
83
+ - `seoMetadata?: SEOMetadata` - SEO metadata for the content
84
+ - `onSEOMetadataChange?: (metadata: SEOMetadata) => void` - Callback when SEO metadata changes
85
+ - `showSEO?: boolean` - Show/hide SEO button (default: `true`)
82
86
 
83
87
  ### CMSRenderer
84
88
 
@@ -310,6 +314,59 @@ importFromHTML(editor, '<h1>Hello World</h1>');
310
314
  importFromMarkdown(editor, '# Hello World');
311
315
  ```
312
316
 
317
+ ### SEO Optimization
318
+
319
+ Manage SEO metadata and analyze content:
320
+
321
+ ```typescript
322
+ import { CMSBlockEditor, SEOMetadata } from 'cms-block-editor';
323
+ import { useState } from 'react';
324
+
325
+ function Editor() {
326
+ const [content, setContent] = useState('');
327
+ const [seoMetadata, setSeoMetadata] = useState<SEOMetadata>({
328
+ title: 'My Page Title',
329
+ description: 'My page description for search engines',
330
+ keywords: ['keyword1', 'keyword2', 'keyword3'],
331
+ ogImage: 'https://example.com/image.jpg',
332
+ twitterCard: 'summary_large_image',
333
+ });
334
+
335
+ return (
336
+ <CMSBlockEditor
337
+ value={content}
338
+ onChange={setContent}
339
+ seoMetadata={seoMetadata}
340
+ onSEOMetadataChange={setSeoMetadata}
341
+ showSEO={true}
342
+ />
343
+ );
344
+ }
345
+ ```
346
+
347
+ **SEO Features**:
348
+ - Meta tags (title, description, keywords, author, canonical)
349
+ - Open Graph tags for social media
350
+ - Twitter Card support
351
+ - Article metadata
352
+ - Schema.org structured data
353
+ - Real-time SEO analysis with scoring
354
+ - Keyword extraction
355
+ - Slug generation
356
+
357
+ **Programmatic SEO Analysis**:
358
+ ```typescript
359
+ import { analyzeSEO, generateMetaTags } from 'cms-block-editor';
360
+
361
+ // Analyze content
362
+ const analysis = analyzeSEO(htmlContent, metadata);
363
+ console.log('SEO Score:', analysis.score); // 0-100
364
+
365
+ // Generate meta tags
366
+ const metaTags = generateMetaTags(metadata);
367
+ // Returns HTML string with all meta tags
368
+ ```
369
+
313
370
  ## Styling
314
371
 
315
372
  The editor comes with default styles. Import the CSS file:
@@ -372,7 +429,10 @@ Check out the [example app](./example-app) for a complete implementation with:
372
429
  ## Documentation
373
430
 
374
431
  Comprehensive guides available:
432
+ - [Features Summary](./docs/FEATURES-SUMMARY.md) - Complete overview of all features
433
+ - [SEO Optimization Guide](./docs/SEO-GUIDE.md) - Complete SEO tools and best practices
375
434
  - [Theme System Guide](./docs/THEME-GUIDE.md) - Complete theming and customization
435
+ - [Advanced Theming Guide](./docs/ADVANCED-THEMING-GUIDE.md) - Theme customizer and builder API
376
436
  - [Video Upload Guide](./docs/VIDEO-GUIDE.md) - Native HTML5 video upload and playback
377
437
  - [Image Editing Guide](./docs/IMAGE-EDITING-GUIDE.md) - Advanced image filters and effects
378
438
  - [Section Creator Guide](./SECTION-CREATOR-GUIDE.md)