ForNeVeR / Kaiwa

A modern XMPP Web client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node module integration Not working in Kaiwa

patelvanita360 opened this issue · comments

Hello All,

I am doing integration of following Node Module in Kaiwa for send emoji in chat.
https://www.npmjs.com/package/emojionearea
I follow below steps

  1. npm install emojionearea --save
  2. create custom.js file
  3. Add following code in custom.js fil

$(document).ready(function() {
$(".emojionearea").emojioneArea();
});

  1. Add class emojionearea to chat input textarea in chat.jade
  2. Add
    var emoji = require('node-emoji'); var emojipicker = require('emojionearea'); require('custom.js');
    in chat.js

But not getting any result front side, can you please check where i am doing mistake ?
Not getting any error in console.

I think the chat input area is not ready yet on document.ready event. Try to call your jquery plugin in render() function in pages/chat.js

tried. Still not working

render: function () {
if (this.rendered) return this;
var self = this;
this.rendered = true;
this.renderAndBind();
var emoji = require('node-emoji');
var emojipicker = require('emojionearea');
require('custom.js');

Thank You. Working Now :) :)