Skip to content

GorillaDash/outlook-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outlook Formatter

Scan all dom and add/replace width attribute, make sure table/img in outlook desktop will be working

Only affect outlook desktop

How to use

Laravel 5.5

    use OutlookFormatter;
    
    $html = ''; // your html
    $result = OutlookFormatter::format($html);

PHP

    use GorillaDash\OutlookFormatter\Formatter;
    
    $formatter = new Formatter(800); // First argument is max width for container;
    $formatter->setAutoCenter(['table' => true, 'image' => true]); // Set all table/td/image to be center, default is false
    
    $html = ''; // your html
    $result = $formatter->format($html);

About

Scan all dom and add/replace width attribute, make sure table/img in outlook desktop will be working

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages