Skip to content

Gmail HTML Inserter - A Chrome extension for seamlessly inserting HTML content in Gmail compose windows.

License

Notifications You must be signed in to change notification settings

ShashiLab/gmail-html-inserter

Repository files navigation

Gmail HTML Inserter

A Chrome extension that enables HTML content insertion in Gmail compose windows with a modern Material Design interface.

Gmail HTML Inserter

Features

  • Insert HTML content directly into Gmail compose windows
  • Modern Material Design dark theme UI
  • HTML preview functionality
  • File upload support (drag & drop enabled)
  • CSS processing to inline styles
  • HTML sanitization for security
  • Seamless Gmail integration

Installation

  1. Clone this repository or download the ZIP
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode"
  4. Click "Load unpacked" and select the extension directory

Usage

  1. Click the extension icon in Chrome to open Gmail
  2. In the compose window, find the HTML icon in the formatting toolbar
  3. Enter HTML content directly or upload an HTML file
  4. Preview your content before inserting
  5. Click "Insert" to add the HTML to your email

Security Features

  • CSS processing converts stylesheet rules to inline styles
  • HTML sanitization removes potentially harmful elements
  • Script tags and event handlers are stripped
  • Iframes are sandboxed
  • Links open in new tabs with security attributes

Development

Project Structure

``` ├── background.js # Chrome extension background worker ├── content.js # Gmail integration and UI components ├── manifest.json # Extension configuration ├── popup.html # Extension popup UI ├── popup.js # Popup functionality └── styles.css # UI styling ```

Building

No build process required - this is a vanilla JavaScript extension.

Testing

  1. Load the extension in developer mode
  2. Open Gmail and compose a new email
  3. Test HTML insertion functionality
  4. Verify sanitization and CSS processing

Release Notes - v1.0.0

  • Initial release
  • HTML content insertion in Gmail
  • Material Design dark theme
  • File upload support
  • Preview functionality
  • CSS processing
  • HTML sanitization
  • Gmail toolbar integration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Support

If you find this extension useful, consider supporting the project through the donate button in the extension popup.

About

Gmail HTML Inserter - A Chrome extension for seamlessly inserting HTML content in Gmail compose windows.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published