Skip to content

Instantly share code, notes, and snippets.

@ryanschuhler
Last active May 21, 2020 14:52
Show Gist options
  • Save ryanschuhler/b8e430950b72849525122ce6154b65b8 to your computer and use it in GitHub Desktop.
Save ryanschuhler/b8e430950b72849525122ce6154b65b8 to your computer and use it in GitHub Desktop.
[#assign src = ""]
[#if configuration.src == "custom"]
[#if configuration.customSrc?starts_with("{")]
[#assign customSrcJson = jsonFactoryUtil.createJSONObject(configuration.customSrc)]
[#if customSrcJson[locale]?has_content]
[#assign src = customSrcJson[locale]]
[#elseif customSrcJson["default"]?has_content]
[#assign src = customSrcJson["default"]]
[/#if]
[#else]
[#assign src = configuration.customSrc]
[/#if]
[#else]
[#assign srcJson = jsonFactoryUtil.createJSONObject(configuration.src)]
[#if srcJson[locale]?has_content]
[#assign src = srcJson[locale]]
[#else]
[#assign src = srcJson["default"]]
[/#if]
[/#if]
<div class="fragment_263944053" data-parent-test="parent-test-1">
<iframe src="${src}?param1=test-1" width="100%" height="500" type="text/html" onload="console.log(document.getElementById('854303_15295pi_854303_15295')); document.getElementById('854303_15295pi_854303_15295').value='my value'" data-test="test-1" frameborder="0" allowTransparency="true" style="border: 0"></iframe>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment