Skip to content

crowdmap-io/cm-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crowdmap widget

Widget to collect feedback and send it to the Crowdmap application.

Installation

Using npm :

$ npm i --save cm-widget

Initialise the widget

Initialise the widget on all pages you want it :

<script src="dist/cm-widget.min.js"></script>
cmWidget.init(
  {
    team  : 'YOUR_ORGANIZATION_NAME', // Required, the organization name who specified when you create your account on https://app.crowdmap.io
    tags  : ['website', 'bug'], // Optional. Array of tags.
    email : 'erwan@crowdmap.io',  // Optional. Email of the author, if not specified, an input will appear in the widget.
    language:'en', // Widget language, accepted values : 'en' (default) or 'fr'
    theme: 'light' // Widget theme, accepted values : 'dark' (default) or 'light'
  });

See our documentation if you want more information or contact us on contact@crowdmap.io

Features

Show / hide widget

cmWidget.showWidget();
cmWidget.hideWidget();

Add & remove tag

cmWidget.removeTag("website");
cmWidget.addTag("website");

Edit the email

cmWidget.setEmail("ben@crowdmap.io");