TinyMCE:API/tinymce.ui.ListBox/selectByIndex

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: selectByIndex

(Requires: 3.2)

Summary

Selects a item/option by index, -1 will select the title of the select box.

Syntax

<void> selectByIndex(<Number> idx)

Parameters

idx
Index to select inside the select box.

Examples

// Selects the third item inside the styleselect control of the active editor
tinyMCE.activeEditor.controlManager.get('styleselect').selectByIndex(2);
Personal tools