Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Simerca opened this issue Jun 18, 2020 · 1 comment
Open

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

Simerca opened this issue Jun 18, 2020 · 1 comment

Comments

@Simerca
Copy link

Simerca commented Jun 18, 2020

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) }

@xch1029
Copy link

xch1029 commented Jul 7, 2021

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) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants