New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ringcentral-c2d

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ringcentral-c2d

RingCentral Click-to-Call and Click-to-Text library

latest
Source
npmnpm
Version
2.0.5
Version published
Maintainers
4
Created
Source

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-Call and Click-to-Text shortcut when hover on phone number text.

clicktodial

See Demo

Install

via npm

npm install ringcentral-c2d

via yarn

yarn add ringcentral-c2d

Overview

This library mainly contains 3 parts

  • Matchers - For matching phone numbers in the provided page content
  • Observers - For watching any DOM changes of the page
  • Widgets - For injecting UI widgets for user to interact with

Get Start

With webpack:

webpack.config.js

import { RingCentralC2D, WidgetEvents } from 'ringcentral-c2d';

const clickToDial = new RingCentralC2D();

clickToDial.widget.on(WidgetEvents.call, (phoneNumber) => {
    console.log('Click to Call:', phoneNumber);
});

clickToDial.widget.on(WidgetEvents.text, (phoneNumber) => {
    console.log('Click to Text:', phoneNumber);
});

// Stop
clickToDial.dispose();

CDN

<script src="https://unpkg.com/ringcentral-c2d@2.0.5/build/index.js"></script>
<script>
    var clickToDial = new RingCentralC2D();

    clickToDial.widget.on('call', function (phoneNumber) {
        console.log('Click to Call:', phoneNumber);
    });

    clickToDial.widget.on('text', function (phoneNumber) {
        console.log('Click to Text:', phoneNumber);
    });

    // Stop
    clickToDial.dispose();
</script>

Advanced

Custom your own widget by referencing this sample code

SampleWidget.ts

// Implement it by referencing sample code
class MyWidget {}

const myWidget = new MyWidget({
    // Any arguments your widget needs
});

// Bind any events as you need
myWidget.on('your-event-name', () => {
    // Your event handler
});

const clickToDial = new RingCentralC2D({
    widget: myWidget,
});

// Stop
clickToDial.dispose();

FAQs

Package last updated on 28 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts