Using an Embed Block, custom scripts that write HTML output back to the page should do so via a defined HTML element (such as a <div id=”custom_output_container”>). This replaces the document.write method used in previous versions of Synthesis.
Javascript + HTML Code Example:
<!-- Establish a Container //-->
<div id="custom_output_container">
<script type="text/javascript">
// Code your function
var userQuery = document.querySelector('[data-kafieldname="fullName"]');
if (userQuery!=undefined)
{
var FullName = userQuery.innerHTML;
// Write back to the output container established earlier:
document.getElementById('custom_output_container').innerHTML = 'The
employee full name is ' + FullName;
</script>
</div>