Important changes to Tiny Cloud pricing > Find out more

tinymce.ui.Selector

Selector engine, enables you to select controls by using CSS like expressions. We currently only support basic CSS expressions to reduce the size of the core and the ones we support should be enough for most cases.

Examples

Supported expressions:
 element
 element#name
 element.class
 element[attr]
 element[attr*=value]
 element[attr~=value]
 element[attr!=value]
 element[attr^=value]
 element[attr$=value]
 element:<state>
 element:not(<expression>)
 element:first
 element:last
 element:odd
 element:even
 element element
 element > element

Constructors

name summary defined by
Selector() Constructs a new Selector instance. tinymce.ui.Selector

Methods

name summary defined by
find() Returns a tinymce.ui.Collection with matches of the specified selector inside the specified container. tinymce.ui.Selector
match() Returns true/false if the selector matches the specified control. tinymce.ui.Selector

Constructors

Selector

public constructor function Selector(selector:String)

Constructs a new Selector instance.

Parameters
  • selector (String) - CSS like selector expression.

Methods

find

find(container:tinymce.ui.Control):tinymce.ui.Collection

Returns a tinymce.ui.Collection with matches of the specified selector inside the specified container.

Parameters
Return value

match

match(control:tinymce.ui.Control, selectors:Array):Boolean

Returns true/false if the selector matches the specified control.

Parameters
  • control (tinymce.ui.Control) - Control to match against the selector.
  • selectors (Array) - Optional array of selectors, mostly used internally.
Return value
  • Boolean - true/false state if the control matches or not.

Can't find what you're looking for? Let us know.

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.