Demo: create QueryField with default design:

nanorep.sdk.QuickAnswer

This component can be used to properly display nanorep articles (not only as plain HTML but with support of all features like automatic assets resizing, multipage answers, truncated mode, etc)

Options:

Example Usage:

1. Add script to your page:

<script src="https://<AccountName>.nanorep.co/web/include.js?sdk=quick-answer"></script>

2. Create <div>:

<div id="example-container"></div>

3. Initialize QuickAnswer component:

// initialize SDK with common parameters
nanorep.sdk.init({
  host: '<AccountName>.nanorep.co', // 'vodafoneuk.nanorep.co' for example
  account: 'product_demo',
  kb: 'Docs'
});

// initialize article component
var article = new nanorep.sdk.QuickAnswer({
  answer: {...},
  contentHeight: 62
}, document.getElementById('example-container'));

Methods:

Events:

Demo: simple large article:

Demo: Localized options:

Add i18n library in include.js script at the top of the page

Check how to use localisation here

Demo: Events: