It is possible to integrate a custom search engine and replace the search results area into your WebHelp Responsive output. This is done by using the following transformation parameters:
<div id="cumstom-search-results">...</div>
<div> element with the id
custom-search-results.document.addEventListener('DOMContentLoaded', (event) => {
const params = new URLSearchParams(window.location.search);
const searchQuery = params.get('searchQuery');
// Implement your custom search engine
// Display the search results
});
searchQuery.<div> element created earlier with the id
custom-search-results.<div>
<script src="${oxygen-webhelp-template-dir}/js/custom-search.js"></script>
</div>
<resources> section (see Template
Resources for more details):
<fileset>
<include name="js/**"/>
</fileset>
<webhelp> element:
<html-fragments>
<fragment file="custom-search-script-fragment.xml"
placeholder="webhelp.fragment.custom.search.engine.script"/>
<fragment file="custom-search-results-fragment.xml"
placeholder="webhelp.fragment.custom.search.engine.results"/>
</html-fragments>