pell icon indicating copy to clipboard operation
pell copied to clipboard

Hi ! There's way to get div id on onChange event ?

Open Simerca opened this issue 4 years ago • 1 comments

Hi, There's way to obtain div id on onChange event ? i use this thing

for(var i = 0; i < elements.length; i++){ this.pellConfig.element = elements[i]; this.pellConfig.onChange = function(e){ console.log(e); } pell.init(this.pellConfig) }

Simerca avatar Jun 18 '20 09:06 Simerca

maybe you can try this:

const onChange = (id, html) => {
    console.log(id, html);
};
for(var i = 0; i < elements.length; i++){ this.pellConfig.element = elements[i]; this.pellConfig.onChange =onChange.bind(this,elements[i].id ) ; } pell.init(this.pellConfig) }

xch1029 avatar Jul 07 '21 07:07 xch1029