diff --git a/examples/N1-Composer-Translate/lib/main.cjsx b/examples/N1-Composer-Translate/lib/main.cjsx index b85cdc01a..c3fbee878 100644 --- a/examples/N1-Composer-Translate/lib/main.cjsx +++ b/examples/N1-Composer-Translate/lib/main.cjsx @@ -71,7 +71,7 @@ class TranslateButton extends React.Component # _renderButton: => diff --git a/examples/N1-Quick-Schedule/lib/main.cjsx b/examples/N1-Quick-Schedule/lib/main.cjsx index 89a0f22a8..2b6f29d77 100644 --- a/examples/N1-Quick-Schedule/lib/main.cjsx +++ b/examples/N1-Quick-Schedule/lib/main.cjsx @@ -131,14 +131,21 @@ module.exports = # Obtain the session for the current draft. DraftStore.sessionForClientId(draftClientId).then (session) => draftHtml = session.draft().body + # Remove any quoted text at the end of the message text = QuotedHTMLTransformer.removeQuotedHTML(draftHtml) - # add the block - text += "
"+@_createBlock(events,eventData)+"
" + # Check for an N1 signature and split that off + sigIndex = text.indexOf('
') + beforeSig = if sigIndex>-1 then text.slice(0,sigIndex) else text + afterSig = text.slice(beforeSig.length) + # Add the block and add back the signature if present + text = beforeSig+"
"+@_createBlock(events,eventData)+"
"+afterSig + + # Add back any quoted text newDraftHtml = QuotedHTMLTransformer.appendQuotedHTML(text, draftHtml) - # update the draft + # Update the draft session.changes.add(body: newDraftHtml) session.changes.commit() diff --git a/internal_packages/composer-signature/lib/signature-composer-extension.coffee b/internal_packages/composer-signature/lib/signature-composer-extension.coffee index b34d37128..8b449b467 100644 --- a/internal_packages/composer-signature/lib/signature-composer-extension.coffee +++ b/internal_packages/composer-signature/lib/signature-composer-extension.coffee @@ -9,6 +9,6 @@ class SignatureComposerExtension extends ComposerExtension insertionPoint = draft.body.indexOf('" + signature + draft.body.substr(insertionPoint) + draft.body = draft.body.slice(0, insertionPoint) + '
' + signature + "
" + draft.body.slice(insertionPoint) module.exports = SignatureComposerExtension