CKEditor 4 Documentation

CKEDITOR.style.customHandlers.widget

Hierarchy

CKEDITOR.style
CKEDITOR.style.customHandlers.widget

Files

The class representing a widget style. It is an object like the styles handler for widgets.

Note: This custom style handler does not support all methods of the CKEDITOR.style class. Not supported methods: applyToRange, removeFromRange, applyToObject.

Available since: 4.4

Defined By

Properties

Indicates that any matches element of this style will be eventually removed when calling CKEDITOR.editor.removeStyle. ...

Indicates that any matches element of this style will be eventually removed when calling CKEDITOR.editor.removeStyle.

Defaults to: false

Available since: 4.0

CKEDITOR.style.customHandlers.widget
view source
: Array
An array of groups that this style belongs to. ...

An array of groups that this style belongs to. Styles assigned to the same group cannot be combined.

Available since: 4.6.2

Indicates that fully selected read-only elements will be included when applying the style (for inline styles only). ...

Indicates that fully selected read-only elements will be included when applying the style (for inline styles only).

Defaults to: false

Available since: 3.5

CKEDITOR.style.customHandlers.widget
view source
: String
The name of widget to which this style can be applied. ...

The name of widget to which this style can be applied. It is extracted from style definition's widget property.

Defined By

Methods

Creates a style class instance. ...

Creates a style class instance.

Parameters

  • styleDefinition : Object
  • variablesValues : Object

Returns

Applies the style on the editor's current selection. ...

Applies the style on the editor's current selection.

Before the style is applied, the method checks if the style is applicable.

Note: The recommended way of applying the style is by using the CKEDITOR.editor.applyStyle method, which is a shorthand for this method.

Parameters

CKEDITOR.style.customHandlers.widget
view source
( )
Not implemented. ...

Not implemented.

Overrides: CKEDITOR.style.applyToObject

CKEDITOR.style.customHandlers.widget
view source
( )
Not implemented. ...

Not implemented.

Overrides: CKEDITOR.style.applyToRange

Builds the preview HTML based on the styles definition. ...

Builds the preview HTML based on the styles definition.

Parameters

  • label : String (optional)

    The label used in the style preview.

Returns

  • String

    The HTML of preview.

( elementPath, editor ) : Boolean
Gets the style state inside the elements path. ...

Gets the style state inside the elements path.

Parameters

  • elementPath : CKEDITOR.dom.elementPath
  • editor : CKEDITOR.editor

    The editor instance. Required argument since CKEditor 4.4. The style system will work without it, but it is highly recommended to provide it for integration with all features. Read more about the signature change in the CKEDITOR.style documentation.

Returns

  • Boolean

    true if the element is active in the elements path.

( elementPath, editor, [filter] ) : Boolean
Whether this style can be applied at the specified elements path. ...

Whether this style can be applied at the specified elements path.

Parameters

  • elementPath : CKEDITOR.dom.elementPath

    The elements path to check the style against.

  • editor : CKEDITOR.editor

    The editor instance. Required argument since CKEditor 4.4. The style system will work without it, but it is highly recommended to provide it for integration with all features. Read more about the signature change in the CKEDITOR.style documentation.

  • filter : CKEDITOR.filter (optional)

    If defined, the style will be checked against this filter as well.

Returns

  • Boolean

    true if this style can be applied at the elements path.

CKEDITOR.style.customHandlers.widget
view source
( element ) : Boolean
Checks if an element is a wrapper of a widget whose name matches the widget name specified in the style definition. ...

Checks if an element is a wrapper of a widget whose name matches the widget name specified in the style definition.

Parameters

Returns

  • Boolean
( element, fullMatch, editor ) : Boolean
Checks if the element matches the current style definition. ...

Checks if the element matches the current style definition.

Parameters

  • element : CKEDITOR.dom.element
  • fullMatch : Boolean
  • editor : CKEDITOR.editor

    The editor instance. Required argument since CKEditor 4.4. The style system will work without it, but it is highly recommended to provide it for integration with all features. Read more about the signature change in the CKEDITOR.style documentation.

Returns

  • Boolean
( element, fullMatch, editor ) : Boolean
Checks if an element, or any of its attributes, is removable by the current style definition. ...

Checks if an element, or any of its attributes, is removable by the current style definition.

Parameters

  • element : CKEDITOR.dom.element
  • fullMatch : Boolean
  • editor : CKEDITOR.editor

    The editor instance. Required argument since CKEditor 4.4. The style system will work without it, but it is highly recommended to provide it for integration with all features. Read more about the signature change in the CKEDITOR.style documentation.

Returns

  • Boolean
CKEDITOR.style.customHandlers.widget
view source
( ) : String[]
Returns classes defined in the style in form of an array. ...

Returns classes defined in the style in form of an array.

Returns

  • String[]
Returns the style definition. ...

Returns the style definition.

Available since: 4.1

Returns

  • Object
Removes the style from the editor's current selection. ...

Removes the style from the editor's current selection.

Before the style is applied, the method checks if style could be applied.

Note: The recommended way of removing the style is by using the CKEDITOR.editor.removeStyle method, which is a shorthand for this method.

Parameters

CKEDITOR.style.customHandlers.widget
view source
( )
Not implemented. ...

Not implemented.

Overrides: CKEDITOR.style.removeFromRange

CKEDITOR.style.customHandlers.widget
view source
( editor ) : Boolean
Removes all styles that belong to the same group as this style. ...

Removes all styles that belong to the same group as this style. This method will neither add nor remove the current style. Returns true if any style was removed, otherwise returns false.

Available since: 4.6.2

Parameters

Returns

  • Boolean
CKEDITOR.style.customHandlers.widget
view source
( The ) : CKEDITOR.filter.allowedContentRules
Returns allowed content rules which should be registered for this style. ...

Returns allowed content rules which should be registered for this style. Uses widget's CKEDITOR.plugins.widget.definition.styleableElements to make a rule allowing classes on specified elements or use widget's CKEDITOR.plugins.widget.definition.styleToAllowedContentRules method to transform a style into allowed content rules.

Parameters

Returns

Overrides: CKEDITOR.style.toAllowedContentRules