md2zrt

1.0.1 • Public • Published

Contributors Forks Stargazers Issues MIT License LinkedIn


md2zrt

Converting markdown text to the Zoom compatable Rich Text format
Explore the docs »

Table of Contents
  1. Getting Started
  2. Usage

Built With

Node

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Node.js

Installation

npm i md2zrt

(back to top)

Usage Example

Require:

const md2zt = require('md2zt');

Interpret Markdown:

/** @type {[string, Array<rich_object>]} */
const [text, rich_objects] = md2zt(markdown);
// markdown: "# Hello World";
// text: 'Hello World';
/*
    rich_objects: [{
        format_type: 'Paragraph',
        format_attr: 'h1',
        start_position: 0,
        end_position: 10
    }];
/*

Fire to Zoom API

    // Posting to /chat/users/{userId}/messages
    const request = require('your-request-lib');
    /* Make POST request*/...
    {
        /* Other request parameters*/...,
        body: {
            message: text,
            rich_text: rich_objects,
            to_channel: ...,
            ...
        },
    }
    

(back to top)

Package Sidebar

Install

npm i md2zrt

Weekly Downloads

4

Version

1.0.1

License

GNU GPL V3

Unpacked Size

49 kB

Total Files

7

Last publish

Collaborators

  • grimby