Dinesh Rawat Dinesh Rawat - 1 year ago 230
Javascript Question

Unable to add resize event to tinymce editor

I am not able to add resize event to tinymce editor. it is giving me:-

Uncaught TypeError: tinymce.dom.Event.add is not a function

What is the right way to do so?

selector: ".tinymceTextarea",
width: '100%',
height: '100%',
plugins: plugins,
statusbar: false,
menubar: false,
toolbar: toolbar,
fontsize_formats : "8px 10px 12px 14px 16px 18px 20px 24px 32px 36px",
// init_instance_callback: "initTinyMCE",
setup: function(e) {
e.on('init', function() {
tinymce.dom.Event.add(e.getWin(), "resize", function(e1) {


Thanks in advance

Answer Source

Try the below snippet without chaining

$("#your_textarea_id").tinymce().getWin().bind('resize',function() {
    console.log('resize triggered !');

    // Your Code goes here.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download