@coveops/result-link-new-tab
v1.0.2
Published
The Result Link New Tab component sets the Coveo configuration to open all result links in a new tab.
Downloads
4
Maintainers
Keywords
Readme
Result Link New Tab
The Result Link New Tab component sets the Coveo configuration to open all result links in a new tab.
Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.
Getting Started
- Install the component into your project.
npm i @coveops/result-link-new-tab
- Use the Component or extend it
Typescript:
import * as ResultLinkNewTab from '@coveops/result-link-new-tab';
Javascript
const ResultLinkNewTab = require('@coveops/result-link-new-tab');
- You can also expose the component alongside other components being built in your project.
export * as ResultLinkNewTab from '@coveops/result-link-new-tab'
- Include the component in your template as follows:
Add the following execution to your code once the page has initialized:
<script>
CoveoResultLinkNewTab()
</script>
If the component is being bundled amongst other components, it will be available on the Coveo object.
<script>
Coveo.ResultLinkNewTab()
</script>
Be sure to update the variables to have the relevant information.
Contribute
- Clone the project
- Build the code base:
npm run build
- Update the test organization ID and API Token and configure your port on the
npm serve
script in thepackage.json
:--org-id <ORG_ID> --token <ORG_KEY> --port 8080
- Serve the sandbox for live development
npm run serve