user6824563 user6824563 - 10 months ago 72
jQuery Question

Get TinyMCE Print event

How can I get the tinyMCE print button event?

I want to do something after clicking on print.
For exxample:

if(editor.print() == 'Finish'){ alert('Test'); }

Does anyone know if it is possible?

Answer Source

You could register for the ExecCommand event.

  selector: 'textarea',
  plugins: 'print',
  init_instance_callback: function (editor) {
    editor.on('ExecCommand', function (e) {
      if (e.command === 'mcePrint') {