Skip to main content
NICE CXone Expert

Scheduled CxOne Expert Maintenance - Oct 26th 11:59 pm PT - Learn More

Expert Success Center

Embedded Contextual Help Touchpoint Events

Applies to:
MindTouch (current)
Role required:
Admin

Events

mindtouch-web-widget:view-article:ready

Fired when the view article widget is created. The event data contains the following properties:

Name Type
embedId string
 document.addEventListener('mindtouch-web-widget:view-article:ready', ({ data }) => {
    const embedId = data.embedId;
});

mindtouch-web-widget:view-article:loaded

Fired when the view article widget is loaded. The event data contains the following properties:

Name Type
embedId string
widget.articlePath string
widget.canGoBack bool
widget.canGoForward bool
widget.goBack function
widget.goForward function
widget.goHome function
widget.initialPath string
widget.navButtonsVisible bool
widget.openButtonVisible bool
widget.openExternal function
document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const embedId = data.embedId;
    
    // programmable widget interface contains properties and functions
    const widget = data.widget;
});

mindtouch-web-widget:view-article:location-changing

Fired when the view article widget is preparing to navigate to a URL. The event data contains the following properties:

Name Type
embedId string
href string
document.addEventListener('mindtouch-web-widget:view-article:location-changing', ({ data }) => {
    const embedId = data.embedId;
    const href = data.href;
});

mindtouch-web-widget:view-article:location-changed

Fired when the view article widget has navigated to a URL. The event data contains the following properties:

Name Type
embedId string
href string
document.addEventListener('mindtouch-web-widget:view-article:location-changed', ({ data }) => {
    const embedId = data.embedId;
    const href = data.href;
});

Properties

articlePath

articlePath : string

(Not to be confused with Expert Paths) Retrieves the page location currently being viewed in the widget, and sets the page location to navigate to. Set as a JavaScript object property or as a data-article-path data attribute on the mindtouch/embed script HTML element.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.articlePath = '{example-page-path}';
    const foo = widget.articlePath;
});
<script async="async" src="https://success.mindtouch.com/@embed/{guid}.js"></script>
<script type="mindtouch/embed" id="mindtouch-embed-{guid}" data-article-path="{example-page-path}"></script>

embedId

embedId : string

The id of the widget that uniquely identifies it.

canGoBack

canGoBack : bool

Retrieves a true value if the back navigation button can navigate a page back in the widget navigation history.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    const foo = widget.canGoBack;
});

canGoForward

canGoForward : bool

Retrieves a true value if the forward navigation button can navigate a page forward in the widget navigation history.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    const foo = widget.canGoForward;
});

goBack

goBack() : void

Navigates the view article widget to the previous page in its navigation history.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.goBack();
});

goForward

goForward() : void

Navigates the view article widget to the next page in its navigation history.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.goForward();
});

goHome

goHome() : void

Navigates the view article widget to the home page.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.goHome();
});

href

href : string

The view article widget current or upcoming page location.

initialPath

initialPath : string

(Not to be confused with Expert Paths) Retrieves the widget's initial navigation page location.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    const foo = widget.initialPath;
});

navButtonsVisible

navButtonsVisible : bool

Retrieves the navigation buttons (back, forward, home) visibility and sets the navigation buttons (back, forward, home) visibility. Set as a JavaScript object property or as a data-nav-buttons-visible data attribute on the mindtouch/embed script HTML element.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.navButtonsVisible = false;
    const foo = widget.navButtonsVisible;
});
<script async="async" src="https://success.mindtouch.com/@embed/{guid}.js"></script>
<script type="mindtouch/embed" id="mindtouch-embed-{guid}" data-nav-buttons-visible="{boolean}"></script>

openButtonVisible

openButtonVisible : bool

Retrieves the open external button visibility and sets the open external button visibility. Set as a JavaScript object property or as a data-open-button-visible data attribute on the mindtouch/embed script HTML element.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.openButtonVisible = false;
    const foo = widget.openButtonVisible;
});
<script async="async" src="https://success.mindtouch.com/@embed/{guid}.js"></script>
<script type="mindtouch/embed" id="mindtouch-embed-{guid}" data-open-button-visible="{boolean}"></script>

openExternal

openExternal() : void

Opens the page currently being viewed in the view article widget in a new browser tab or window.

document.addEventListener('mindtouch-web-widget:view-article:loaded', ({ data }) => {
    const widget = data.widget;
    widget.openExternal();
});

 

  • Was this article helpful?