Considerations for Custom Components

Certain custom components that work in Lightning App Builder aren’t compatible for use in the Email Content Builder. Review the requirements for existing custom components before enabling them for use in the email builder.

The rendering engine that powers our content builder is run in a secure environment. However, there are limits on what code you can add in the custom component files.

  • Any type of DOM API
  • The renderedCallback() lifecycle hook in .js file
  • The Web API fetch() method in .js files
  • <script> tags in .html files
  • References to the window object in .js files
  • Base components in the lightning namespace
  • The wire service using the @wire syntax
  • Apex classes, except for those that extend PicklistEntry or DynamicPicklist
  • SLDS tokens and :host selectors aren’t supported.
  • We recommend you use a unique class name or prepend CSS class names with a namespace to differentiate from other components.
  • Populate a picklist by creating the HTML markup using Apex.
  • External callouts from Apex that are used as a picklist data source only work if the following method is overridden: global override Boolean isValid(Object attributeValue){return true;}