const SignatureUtils = {
applySignature(body, signature) {
const signatureRegex = /
.*<\/div>/;
let signatureHTML = '
' + signature + '
';
let insertionPoint = body.search(signatureRegex)
let newBody = body;
// If there is a signature already present
if (insertionPoint !== -1) {
// Remove it
newBody = newBody.replace(signatureRegex, "")
} else {
insertionPoint = newBody.indexOf('