I have several divs where tinymce is executed, I need to take the value of the data_id attribute of the div where the change is detected in the editor.
<div class="myeditablediv" data_id="test">Edit</div>
tinymce.init({
selector: '.myeditablediv',
inline: true,
extended_valid_elements: "+@[data_id]",
setup: function(editor) {
editor.on('change', function(e) {
var id = $(this).attr('data_id') ///not working;
alert(id);
});
}
});