tinymce.full.js
function (type, settings) {
        var ControlType;

        // If string is specified then use it as the type
        if (typeof type == 'string') {
          settings = settings || {};
          settings.type = type;
        } else {
          settings = type;
          type = settings.type;
        }

        // Find control type
        type = type.toLowerCase();
        ControlType = types[type];

        // #if debug

        if (!ControlType) {
          throw new Error("Could not find control by type: " + type);
        }

        // #endif

        ControlType = new ControlType(settings);
        ControlType.type = type; // Set the type on the instance, this will be used by the Selector engine

        return ControlType;
      }
function (type, settings) {
        var ControlType;

        // If string is specified then use it as the type
        if (typeof type == 'string') {
          settings = settings || {};
          settings.type = type;
        } else {
          settings = type;
          type = settings.type;
        }

        // Find control type
        type = type.toLowerCase();
        ControlType = types[type];

        // #if debug

        if (!ControlType) {
          throw new Error("Could not find control by type: " + type);
        }

        // #endif

        ControlType = new ControlType(settings);
        ControlType.type = type; // Set the type on the instance, this will be used by the Selector engine

        return ControlType;
      }
function ( type , settings ) { var ControlType ; // If string is specified then use it as the type if ( typeof type == 'string' ) { settings = settings || { } ; settings . type = type ; } else { settings = type ; type = settings . type ; } // Find control type type = type . toLowerCase ( ) ; ControlType = types [ type ] ; // #if debug if ( ! ControlType ) { throw new Error ( "Could not find control by type: " + type ) ; } // #endif ControlType = new ControlType ( settings ) ; ControlType . type = type ; // Set the type on the instance, this will be used by the Selector engine return ControlType ; }
Creates a new control instance based on the settings provided. The instance created will be
based on the specified type property it can also create whole structures of components out of
the specified JSON object.

@example
tinymce.ui.Factory.create({
type: 'button',
text: 'Hello world!'
});

@method create
@param {Object/String} settings Name/Value object with items used to create the type.
@return {tinymce.ui.Control} Control instance based on the specified type.
Creates a new control instance based on the settings provided . The instance created will be based on the specified type property it can also create whole structures of components out of the specified JSON object .