Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions applications/party/template/party/DisplayCommunicationContent.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,22 @@ under the License.
-->


<#-- Display content in a specific div to avoid display conflicts -->
<div style="margin-left: 14%;width:50% !important;">
${StringUtil.wrapString(childCommEvent.content!)}
</div>
<#-- iframe isolates the email's <style> block from the parent page. Stored content is
HTML-entity-encoded, so decode it via a textarea before assigning to srcdoc. -->
<#assign iframeId = "commContent_" + childCommEvent.communicationEventId>
<iframe id="${iframeId}"
sandbox="allow-same-origin"
style="width: 100%; min-height: 600px; border: 1px solid #ccc; margin-left: 14%;"></iframe>
<script type="text/javascript">
(function() {
var iframe = document.getElementById('${iframeId}');
iframe.onload = function() {
try {
this.style.height = (this.contentWindow.document.documentElement.scrollHeight + 20) + 'px';
} catch (e) {}
};
var decoder = document.createElement('textarea');
decoder.innerHTML = '${StringUtil.wrapString((childCommEvent.content!'')?js_string)}';
iframe.srcdoc = decoder.value;
})();
</script>