Skip to content

Grimbyy/md2zrt

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published