I am trying to register some event listeners to elements rendered using froala editor react component. I am passing my 'potential' event listener in froala config as suggested in the documentation.
Here is what i am trying to achieve
events : {
'froalaEditor.initialized': function(e, editor) {
var elements = document.getElementsByClassName('some-class-id-that-i-know-exists');
for (var i=0; i< elements.length ; i++) {
elements[i].addEventListener('mouseover', eventListnerSubscriber(elements[i]), true);
}
}
}
// outside config
function eventListnerSubscriber(element) {
console.log(element);
}
here the callback method 'eventListnerSubscriber ' upon event mouseover is not getting invoked.
Anything i am doing wrong?