Parameters (String html_input);
Returns: String;
This function is only supported for Salesforce -> Jira migrations. It's intended use is to replace image tags within Salesforce HTML field values with the Jira/Confluence equivalent to ensure that embedded images are correctly linked to the migrated target attachments and are displayed in the target.
The function also updates links embedded in the document to be compatible with Confluence, with links to other articles being created as 'Smart Links' in the Confluence article.
This should be used as part of the migration of Knowledge Articles from Salesforce to Confluence.
The parameter is the HTML value from the Salesforce record, potentially containing embedded images linked to Salesforce content and links to other Salesforce articles.
The function will perform the following transformation actions:
- Extract all image tags from the html
- For each one;
- Determine the name of the attachment in Jira (this assumes the image was attached to the Confluence Article using Precision Bridge
- Update the image tag source to point to the correct Jira Attachment
- Extract all link tags from the html
- For each one:
- Identify if this is an external link, or a link to another article
- For article links, identify the confluence page that the link should be repointed to, by matching the title and create a smart link, pointing to the confluence page
- For article links, raise a warning if the article cannot be found on confluence. In this case, the smart link will still be created, but will not have a target set
- For external links, format the link to be compatible with confluence. The link will be formatted to open in a separate window.
The function will return the updated html string.
Comments
0 comments
Please sign in to leave a comment.