Report an issue
Class

CKEDITOR.plugins.notification.area

class since 4.5.0 private

Notification area is an area where all notifications are put. The area is laid out dynamically. When the first notification is added, the area is shown and all listeners are added. When the last notification is removed, the area is hidden and all listeners are removed.

Filtering

Properties

  • readonly

    editor : editor

    The editor instance.

  • readonly

    element : element

    Notification area DOM element. This element is created when the area object is created. It will be attached to the document when the first notification is added and removed when the last notification is removed.

  • readonly

    notifications : Array

    The array of added notifications.

  • private

    _changeBuffer : Object

    Event buffer object for editor change events to optimize performance.

  • private

    _notificationMargin : element

    Notification margin. Cached for performance reasons.

  • private

    _notificationWidth : element

    Notification width. Cached for performance reasons.

  • private

    _uiBuffer : Object

    Event buffer object for UI events to optimize performance.

Methods

  • constructor( editor ) → area

    Parameters

    editor : editor

    The editor instance.

    Returns

    area
  • add( notification )

    Adds the notification to the notification area. If it is the first notification, the area will also be attached to the document and listeners will be attached.

    Note that the proper way to show a notification is to call the CKEDITOR.plugins.notification.show method.

    Parameters

    notification : notification

    Notification to add.

  • remove( notification )

    Removes the notification from the notification area. If it is the last notification, the area will also be detached from the document and listeners will be detached.

    Note that the proper way to hide a notification is to call the CKEDITOR.plugins.notification.hide method.

    Parameters

    notification : notification

    Notification to remove.

  • private

    _attachListeners()

    Attaches listeners to the notification area.

  • private

    _createElement() → element

    Creates the notification area element.

    Returns

    element

    Notification area element.

  • private

    _layout()

    Sets the position of the notification area based on the editor content, toolbar as well as viewport position and dimensions.

  • private

    _removeListeners()

    Detaches listeners from the notification area.