Skip to content Skip to main navigation Skip to footer

Merging Rich Text Fields Considerations

  1. Rich text field saves HTML code as the actual value in the field. We merge that HTML code as is.
  2. Images in Rich Text fields cannot be merged. Instead, take a look at our image merge feature: https://kb.opero.com/documents/knowledge-base/template-configuration/#mergeimages
  3. Place each rich text merge field on its own line; merging two rich text merge fields in a single line is not supported.
  4. Any font style set in the rich text field (e.g., size, color, face) is retained HTML style that is merged into the document. The font style is not changed from the rich text value to the value in the Google Doc template. For example, if you have a Salesforce rich text field where the font is Times New Roman, and within the Google Doc you set the font of the merge field code (for the rich text field) to Arial, the merged text will still be Times New Roman.
  5. If you want the font style set in the Google Document template, do not specify a font style in the rich text field. Instead, set the default style on the whole Google Document template, which will set the default style when it is merged. See this article for steps to set the default style of your Google Doc template: https://kb.opero.com/documents/knowledge-base/set-the-default-style-for-a-google-doc-template/
  6. If you copy/paste text from another source instead of using the Salesforce Rich Text UI field to create the text, then some HTML from the source copied from could retain some additional HTML code in the paste. There might be some HTML not supported in the merge process. To troubleshoot, try typing and creating the text from scratch in the Rich Text field in Salesforce to identify if there is some HTML code incompatibility from the copied text. If you can identify what html code is causing any issue, then you can create a process such as an apex trigger to remove or modify the HTML code after saving. Below are some examples we have identified:
    1. <div></div> tags added around <p> (line break) tags cause line breaks to not work. <div></div> tags should be removed from the HTML.