How to use the juice.inlineDocument function in juice

To help you get started, we’ve selected a few juice examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxlapides / dovetailer / lib / build.js View on Github external
injectInlineStyles($, styles) {
    // inline styles using Juice and clean up extra whitespace
    const opts = {
      applyAttributesTableElements: true,
      applyHeightAttributes: true,
      applyWidthAttributes: true
    }
    juice.inlineDocument($, styles, opts)
    return $
  }