TinyMCE:API/tinymce.Editor/onSetProgressState

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onSetProgressState

Summary

This event gets executed when the setProgressState function gets executed. This enables you to display a throbber or loading message.

Syntax

event_callback(<tinymce.Editor> ed, <Boolean> b, <Number> ti, <Object> o)

Parameters

ed
Sender object/Editor instance that is serializing an element.
b
Boolean state if the progress should be shown or hidden.
ti
Optional time to wait before the progress gets shown.
o
Optional object that got passed from the setProgressState function.

Examples

// Adds an observer to the onSetProgressState event using tinyMCE.init
tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onSetProgressState.add(function(ed, b) {
           if (b)
                console.debug('SHOW!');
           else
                console.debug('HIDE!');
      });
   }
});

// Adds an observer to the onSetProgressState event using the render method
var ed = new tinymce.Editor('someid', {
   .. Some settings
});

ed.onSetProgressState.add(function(ed, b) {
   if (b)
      console.debug('SHOW!');
   else
      console.debug('HIDE!');
});

ed.render();
Personal tools