Class

AbstractEditorHandler (fullscreen/handlers)

@ckeditor/ckeditor5-fullscreen/src/handlers/abstracteditorhandler

class

The abstract editor type handler. It should be extended by the particular editor type handler.

Filtering

Properties

  • updateDialogPositionCallback : ( EventInfo<string, unknown>, string, boolean ) => void

    Stores a bound reference to the _updateDialogPosition method, allowing it to be attached and detached from change event.

  • protected

    _closeRevisionViewerCallback : null | ( default ) => Promise<unknown>

    A callback that closes the revision viewer, stored to restore the original one after exiting the fullscreen mode.

  • protected

    _editor : object

    An editor instance. It should be set by the particular editor type handler.

  • protected

    _showRevisionViewerCallback : null | ( EditorConfig ) => Promise<null | default>

    A callback that shows the revision viewer, stored to restore the original one after exiting the fullscreen mode.

  • private

    _annotationsUIsData : null | Map<string, Record<string, any>>

    Data of the annotations UIs that were active before entering the fullscreen mode.

  • private

    _document : Document

    The document object in which the editor is located.

  • private

    _hiddenElements : Map<HTMLElement, string>

    A map of elements that were hidden when entering the fullscreen mode. It is used to restore their previous visibility when leaving the fullscreen mode and avoid showing elements that were hidden before entering the fullscreen mode.

  • private

    _paginationBodyCollection : null | BodyCollection

    The pagination body collection that is used in the fullscreen mode. If we don't move pagination lines to the fullscreen container, they won't be visible.

  • private

    _placeholderMap : Map<string, object>

    Maps placeholder names to placeholder elements and moved elements.

  • private

    _savedAncestorsScrollPositions : Map<HTMLElement, object>

    A map matching the ancestors of the editable element with their scroll positions before entering fullscreen mode.

  • private

    _wrapper : null | HTMLElement

    The wrapper element that holds the fullscreen mode layout.

Methods

  • constructor( editor )

    Parameters

    editor : Editor
  • destroy() → void

    Returns

    void
  • disable() → void

    Disables the fullscreen mode by restoring all moved elements and destroying the fullscreen container.

    Returns

    void
  • enable() → void

    Enables the fullscreen mode. It executes the editor-specific enable handler and then the configured callback.

    Returns

    void
  • getWrapper() → HTMLElement

    Returns the fullscreen mode container element.

    Returns

    HTMLElement
  • moveToFullscreen( elementToMove, placeholderName ) → void

    Moves the given element to the fullscreen mode container, leaving a placeholder in its place.

    Parameters

    elementToMove : HTMLElement
    placeholderName : string

    Returns

    void
  • restoreMovedElementLocation( placeholderName ) → void

    Returns a single moved element to its original place.

    Parameters

    placeholderName : string

    Returns

    void
  • protected

    _defaultOnEnter() → HTMLElement

    A function that moves the editor UI elements to the fullscreen mode. It should be set by the particular editor type handler.

    Returns the fullscreen mode container element so it can be further customized via fullscreen.onEnterCallback configuration property.

    Returns

    HTMLElement
  • private

    _destroyContainer() → void

    Destroys the fullscreen mode container.

    Returns

    void
  • private

    _generateDocumentOutlineContainer() → void

    Checks if the DocumentOutlineUI plugin is available and moves its elements to fullscreen mode.

    Returns

    void
  • private

    _generatePresenceListContainer() → void

    Checks if the PresenceListUI plugin is available and moves its elements to fullscreen mode.

    Returns

    void
  • private

    _overrideAnnotationsUIs() → void

    Stores the current state of the annotations UIs to restore it when leaving fullscreen mode.

    Returns

    void
  • private

    _overrideRevisionHistoryCallbacks() → void

    Modifies the revision history viewer callbacks to display the viewer in the fullscreen mode.

    Returns

    void
  • private

    _registerFullscreenDialogPositionAdjustments() → void

    Adds an event listener when the dialog opens to adjust its position in fullscreen mode, utilizing the empty space on the right side of the editable element.

    Returns

    void
  • private

    _restoreAnnotationsUIs() → void

    Restores the saved state of the annotations UIs.

    Returns

    void
  • private

    _restoreDocumentOutlineDefaultContainer() → void

    Restores the default value of documentOutlineContainer, which is modified in fullscreen mode.

    Returns

    void
  • private

    _restoreRevisionHistoryCallbacks() → void

    Resets the revision history viewer callbacks to their original values.

    Returns

    void
  • private

    _saveAncestorsScrollPositions( domElement ) → void

    Saves the scroll positions of all ancestors of the given element.

    Parameters

    domElement : HTMLElement

    Returns

    void
  • private

    _setNewDialogPosition() → void

    Adjusts the dialog position to utilize the empty space on the right side of the editable. The new dialog position should be on the right side of the fullscreen view with a 30px margin. Only dialogs with the position set to "editor-top-side" should have their position changed.

    Returns

    void
  • private

    _sourceEditingCallback( _evt, _name, value ) → void

    A callback that hides the document outline header when the source editing mode is enabled. Document outline element itself is hidden by source editing plugin.

    Parameters

    _evt : EventInfo<string, unknown>
    _name : string
    value : boolean

    Returns

    void
  • private

    _unregisterFullscreenDialogPositionAdjustments() → void

    Removes an event listener that adjusts the dialog's position in fullscreen mode.

    Returns

    void
  • private

    _updateDialogPosition( _evt, _name, isOpen ) → void

    If dialog is open, adjust its positioning.

    Parameters

    _evt : EventInfo<string, unknown>
    _name : string
    isOpen : boolean

    Returns

    void