CKEDITOR.plugins.notification.area
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
-
The editor instance.
-
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.
-
notifications : Array
readonly
The array of added notifications.
-
_changeBuffer : Object
private
Event buffer object for editor change events to optimize performance.
-
_notificationMargin : element
private
Notification margin. Cached for performance reasons.
-
_notificationWidth : element
private
Notification width. Cached for performance reasons.
-
_uiBuffer : Object
private
Event buffer object for UI events to optimize performance.
Methods
-
constructor( editor ) → 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.
-
_attachListeners()
private
Attaches listeners to the notification area.
-
_createElement() → element
private
Creates the notification area element.
Returns
element
Notification area element.
-
_layout()
private
Sets the position of the notification area based on the editor content, toolbar as well as viewport position and dimensions.
-
_removeListeners()
private
Detaches listeners from the notification area.