UNPKG

payload-plugin-newsletter

Version:

Complete newsletter management plugin for Payload CMS with subscriber management, magic link authentication, and email service integration

44 lines (40 loc) 1.05 kB
import { SerializedEditorState } from 'lexical'; /** * DOMPurify configuration for email-safe HTML */ declare const EMAIL_SAFE_CONFIG: { ALLOWED_TAGS: string[]; ALLOWED_ATTR: string[]; ALLOWED_STYLES: { '*': string[]; }; FORBID_TAGS: string[]; FORBID_ATTR: string[]; }; /** * Converts Lexical editor state to email-safe HTML */ declare function convertToEmailSafeHtml(editorState: SerializedEditorState, options?: { wrapInTemplate?: boolean; preheader?: string; }): Promise<string>; /** * Email HTML validation utilities */ interface ValidationResult { valid: boolean; warnings: string[]; errors: string[]; stats: { sizeInBytes: number; imageCount: number; linkCount: number; hasExternalStyles: boolean; hasJavaScript: boolean; }; } /** * Validate HTML for email compatibility */ declare function validateEmailHtml(html: string): ValidationResult; export { EMAIL_SAFE_CONFIG, type ValidationResult, convertToEmailSafeHtml, validateEmailHtml };