Skip to main content
MindTouch Success Center

Contextual Help Touchpoint Events

Applies to:
MindTouch (current)
Role required:
Admin

Events

mindtouch-web-widget:f1:ready

Fired when the F1 widget is created. The event data contains the following parameters:

  • embedId <String> - The ID string of the widget that uniquely identifies it
 document.addEventListener('mindtouch-web-widget:f1:ready', ({ data }) => {
    const embedId = data.embedId;
});

mindtouch-web-widget:f1:loaded

Fired when the F1 widget is loaded. The event data contains the following parameters:

  • embedId <String> - The ID string of the widget that uniquely identifies it
  • widget <Object> - The object interface to the widget that contains the properties and/or functions listed below
document.addEventListener('mindtouch-web-widget:f1:loaded', ({ data }) => {
    const embedId = data.embedId;
    const widget = data.widget;
});

mindtouch-web-widget:f1:modal-rendered

Fired when the F1 modal dialog has been rendered. The event data contains the following parameters:

  • embedId <String> - The ID string of the widget that uniquely identifies it
  • modal <Element> - The DOM Element of the modal dialog wrapper that has been rendered
document.addEventListener('mindtouch-web-widget:f1:modal-rendered', ({ data }) => {
    const embedId = data.embedId;
    const modal = data.modal;
});

mindtouch-web-widget:f1:dialog-rendered

Fired when the F1 dialog is displayed to the user. The event data contains the following parameters:

  • embedId <String> - The ID string of the widget that uniquely identifies it
  • dialog <Element> - The DOM Element of the F1 dialog
document.addEventListener('mindtouch-web-widget:f1:dialog-rendered', ({ data }) => {
    const embedId = data.embedId;
    const modal = data.modal;
});

mindtouch-web-widget:f1:clicked

Fired when an element designated to launch the dialog is clicked. If the event’spreventDefaultflag is set, the click will be ignored, and the dialog will not be launched. The event data contains the following parameters:

  • embedId <String> - The ID string of the widget that uniquely identifies it
  • href <String> - The URL string of the MindTouch page that will be opened as a result of the click
document.addEventListener('mindtouch-web-widget:f1:clicked', (event) => {
    const embedId = event.data.embedId;
    const href = event.data.href;
    
    // optionally prevents dialog from launching
    event.preventDefault();
});

Functions

open(href)

Opens the F1 dialog with content from the supplied MindTouch URL. This function accepts the following parameters:

  • href <String> - The URL string of the MindTouch page to display in the F1 dialog
document.addEventListener('mindtouch-web-widget:f1:loaded', ({ data }) => {
    const widget = data.widget;
    widget.open('https://success.example.com/foo');
});
  • Was this article helpful?