Skip to content
RingCentral Click To Dial library
JavaScript TypeScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build feat: support to customize ui (#5) Apr 15, 2019
demo
src feat: support to customize ui (#5) Apr 15, 2019
.gitignore init Jan 23, 2019
README.md docs: add npm badge Apr 15, 2019
package.json feat: support to customize ui (#5) Apr 15, 2019
tsconfig.json
tslint.json init Jan 23, 2019
webpack.config.js init Jan 23, 2019
yarn.lock

README.md

RingCentral Click To Dial library

NPM Version

This library can help you to get phone numbers in web page and show a RingCentral Click to Dial and Click to SMS shortcut when hover on phone number text.

clicktodial

See Demo

Install

via npm

npm install ringcentral-c2d libphonenumber-js

via yarn

yarn add ringcentral-c2d libphonenumber-js

Use

With webpack:

import RingCentralC2DInject from 'ringcentral-c2d';
import 'ringcentral-c2d/build/styles.css';

var clickToDialInject = new RingCentralC2DInject({
  onCallClick: (phoneNumber) => {
    console.log('Click To Dial:', phoneNumber);
  },
  onSmsClick: (phoneNumber) => {
    console.log('Click To SMS:', phoneNumber);
  }
})

// Stop
clickToDialInject.dispose();

CDN

<link href="https://unpkg.com/ringcentral-c2d@0.0.3/build/styles.css" rel="stylesheet">
<script src="https://unpkg.com/libphonenumber-js@1.7.7/bundle/libphonenumber-min.js"></script>
<script src="https://unpkg.com/ringcentral-c2d@0.0.3/build/index.js"></script>
<script>
  var clickToDialInject = new RingCentralC2DInject({
    onCallClick: function (phoneNumber) {
      console.log('Click To Dial:', phoneNumber);
    },
    onSmsClick: function (phoneNumber) {
      console.log('Click To SMS:', phoneNumber);
    }
  });

  // Stop
  clickToDialInject.dispose();
</script>
You can’t perform that action at this time.