chat-engine-markdown

0.0.9 • Public • Published

Markdown Plugin for ChatEngine

Adds the ability to render Markdown in a ChatEngine Chat

Quick Start

  1. Have a ChatEngine server running already, instantiate a client and connect it
const ChatEngine = ChatEngineCore.create({
    publishKey: 'pub-key-here',
    subscribeKey: 'sub-key-here'
});
 
ChatEngine.connect('Username');
ChatEngine.on('$ready', () = { ... });
  1. Attach this plugin to the channel you want, in this case global
ChatEngine.global.plugin(ChatEngineCore.plugin['chat-engine-markdown']());
  1. Listen for the message event
ChatEngine.global.on('message', (payload) => {
    console.log(payload.data.text);
});
  1. Send a message containing Markdown
ChatEngine.global.emit('message', {
    text: 'This is some *markdown* **for sure**.'
});
// This is some <em>markdown</em> <strong>for sure</strong>.

Support

  • If you need help, have a general question a feature request or to file a bug, contact support@pubnub.com

Readme

Keywords

none

Package Sidebar

Install

npm i chat-engine-markdown

Weekly Downloads

5

Version

0.0.9

License

none

Unpacked Size

1.95 MB

Total Files

11

Last publish

Collaborators

  • client-engineering-bot
  • stephenlb
  • pubnub-admin
  • ianjennings
  • raimondi1337
  • ajb413
  • madisonsmith
  • crgbaumgart