tinymce.ui.Factory

This class is a factory for control instances. This enables you to create instances of controls without having to require the UI controls directly. It also allow you to override or add new control types.

Methods

name summary defined by
add() Adds a new control instance type to the factory. tinymce.ui.Factory
create() 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. tinymce.ui.Factory
has() Returns true/false if the specified type exists or not. tinymce.ui.Factory

Methods

add

add(type:String, typeClass:function)

Adds a new control instance type to the factory.

Parameters

create

create(settings:Object):tinymce.ui.Control

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.

Examples
tinymce.ui.Factory.create({
    type: 'button',
    text: 'Hello world!'
});
Parameters
Return value

has

has(type:String):Boolean

Returns true/false if the specified type exists or not.

Parameters
Return value

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.