user6824563 user6824563 - 1 year ago 109
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') {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download