This class allows to create "article footer" with Feedback and Channeling components inside.
1. Add script to your page:
<script src="https://<AccountName>.nanorep.co/web/include.js?sdk=article-actions"></script>
2. Create empty <div>
:
<div id="article-actions-example"></div>
3. Initialize ArticleActions component:
nanorep.sdk.init({ host: 'product_demo.nanorep.co', account: 'product_demo', kb: 'docs' }); // initialize article actions component var articleActions = new nanorep.sdk.ArticleActions({ articleId: '1048337092', feedbackType: 'icons' }, document.getElementById('article-actions-example'));
Type: String
id of the article (required)
new nanorep.sdk.ArticleActions({ articleId: '1048337092' }, document.getElementById('example-options-articleId'));
<div id="example-options-articleId"></div>
Type: String
Default: 'icons'
Specify which feedback type to use - 'icons'
or 'textual'
new nanorep.sdk.ArticleActions({ articleId: '1048337092', feedbackType: 'textual' }, document.getElementById('example-options-feedbackType'));
<div id="example-options-feedbackType"></div>
Type: String
Default: 'auto'
Specify which feedback type to use - 'multipleChoiceOpenText'
or 'multipleChoice'
or 'openText'
new nanorep.sdk.ArticleActions({ articleId: '1048337092', feedbackDialogType: 'multipleChoiceOpenText' }, document.getElementById('example-options-feedbackDialogType'));
<div id="example-options-feedbackDialogType"></div>
Type: Boolean
Default: true
Specify if feedback should be enabled
new nanorep.sdk.ArticleActions({ articleId: '1048337092', enableFeedback: false }, document.getElementById('example-options-enableFeedback'));
<div id="example-options-enableFeedback"></div>
Type: Boolean
Default: true
Specify if channeling should be enabled
new nanorep.sdk.ArticleActions({ articleId: '1048337092', enableChanneling: false }, document.getElementById('example-options-enableChanneling'));
<div id="example-options-enableChanneling"></div>
Type: CSS Selector
or DOM Node
Default: null
Specify css selector or Dom Node for custom container that will be used by contact forms with "showInArticle" option enabled
new nanorep.sdk.ArticleActions({ articleId: '1050202002', inlineFormContainer: '#inline-container' }, document.getElementById('example-options-inlineFormContainer'));
<div id="example-options-inlineFormContainer"></div> <div id="inline-container"></div>
articleActionsInstance.on('ready', function() {})
Occurred when channels are loaded and component is displayed
new nanorep.sdk.ArticleActions({ articleId: '1048337092' }, document.getElementById('example-events-ready')).on('ready', function() { alert('Component is ready'); });
<div id="example-events-ready"></div>