payload-plugin-newsletter
Version:
Complete newsletter management plugin for Payload CMS with subscriber management, magic link authentication, and email service integration
40 lines (34 loc) • 1.56 kB
TypeScript
import { RichTextField, Block, Field } from 'payload';
import { NewsletterPluginConfig } from './types.js';
/**
* Creates email-safe features for Lexical editor with optional additional blocks
* Only includes features that render consistently across email clients
*/
declare const createEmailSafeFeatures: (additionalBlocks?: Block[]) => any[];
/**
* Creates a Lexical editor configured specifically for email content
* Processes blocks server-side to avoid client serialization issues
*/
declare const createEmailLexicalEditor: (customBlocks?: Block[]) => any;
/**
* Legacy export for backward compatibility
*/
declare const emailSafeFeatures: any[];
/**
* Creates an email-safe rich text field configuration
*/
declare const createEmailContentField: (overrides?: Partial<RichTextField> & {
additionalBlocks?: Block[];
editor?: any;
}) => RichTextField;
declare const createBroadcastInlinePreviewField: () => Field;
declare function createNewsletterSchedulingFields(config: NewsletterPluginConfig): Field[];
/**
* Validates that blocks are email-compatible and warns about potential issues
*/
declare const validateEmailBlocks: (blocks: Block[]) => void;
/**
* Creates email-safe block configurations by filtering and validating blocks
*/
declare const createEmailSafeBlocks: (customBlocks?: Block[]) => Block[];
export { createBroadcastInlinePreviewField, createEmailContentField, createEmailLexicalEditor, createEmailSafeBlocks, createEmailSafeFeatures, createNewsletterSchedulingFields, emailSafeFeatures, validateEmailBlocks };