To integrate the in-product help within a custom page, proceed as follows:
- Add a Custom component to the custom page.
- Go to the Settings section of the Custom component, and select Open editor.
-
Paste the following code block in the HTML section:
<div class="example"> <ft-button icon="comment_question" id="question-button"> My opening button </ft-button> <ft-in-product-help id="iph" portalurl="${PORTAL_URL}" displaymode="standard" closeicon="x_mark" standardmodeicon="pip" theatermodeicon="pip_wide" fullscreenmodeicon="expand_wide" enablehomebutton="" homeicon="home" enableopentabbutton="" opentabicon="extlink_light" iconvariant="fluid-topics" style=""></ft-in-product-help> </div>Replace
${PORTAL_URL}by the entire URL of the portal, includinghttps://. For more information, see the Example section. -
Paste the following code block in the JS section:
const scripts = [ "https://cdn.jsdelivr.net/npm/@fluid-topics/ft-in-product-help/build/ft-in-product-help.min.js", "https://cdn.jsdelivr.net/npm/@fluid-topics/ft-button/build/ft-button.min.js", "https://cdn.jsdelivr.net/npm/@fluid-topics/ft-size-watcher/build/ft-size-watcher.min.js" ] scripts.forEach(src => { const script = document.createElement("script") script.setAttribute("async", "true") script.setAttribute("src", src) document.append(script) }) document.getElementById('question-button').addEventListener('click', function() { let iph = document.getElementById('iph'); console.log(iph.getAttribute('opened')) if (iph.hasAttribute('opened')) { iph.removeAttribute('opened'); } else { iph.setAttribute('opened', ""); } }); -
Select Save.
Select this link to view a working example.