[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-admin/js/ -> editor-expand.js (summary)

(no description)

File Size: 1617 lines (43 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 34 functions


Functions that are not part of a class:

textEditorResize()   X-Ref
Resizes the text editor depending on the old text length.

If there is an mceEditor and it is hidden, it resizes the editor depending
on the old text length. If the current length of the text is smaller than
the old text length, it shrinks the text area. Otherwise it resizes the editor to
the scroll height.

return: {void}

getHeights()   X-Ref
Gets the height and widths of elements.

Gets the heights of the window, the adminbar, the tools, the menu,
the visualTop, the textTop, the bottom, the statusbar and sideSortables
and stores these in the heights object. Defaults to 0.
Gets the width of the window and stores this in the heights object.

return: {void}

mceGetCursorOffset()   X-Ref
Gets the offset of the editor.

return: {Number|Boolean} Returns the offset of the editor

mceKeyup( event )   X-Ref
Filters the special keys that should not be used for scrolling.

param: {event} event The event to get the key code from.
return: {void}

mceScroll( key )   X-Ref
Makes sure the cursor is always visible in the editor.

Makes sure the cursor is kept between the toolbars of the editor and scrolls
the window when the cursor moves out of the viewport to a wpview.
Setting a buffer > 0 will prevent the browser default.
Some browsers will scroll to the middle,
others to the top/bottom of the *window* when moving the cursor out of the viewport.

param: {string} key The key code of the pressed key.
return: {void}

mceFullscreenToggled( event )   X-Ref
If the editor is fullscreen, calls adjust.

param: {event} event The FullscreenStateChanged event.
return: {void}

mceShow()   X-Ref
Shows the editor when scrolled.

Binds the hideFloatPanels function on the window scroll.mce-float-panels event.
Executes the wpAutoResize on the active editor.

return: {void}

mceHide()   X-Ref
Resizes the editor.

Removes all functions from the window scroll.mce-float-panels event.
Resizes the text editor and scrolls to a position based on the pageXOffset and adminBarHeight.

return: {void}

toggleAdvanced()   X-Ref
Toggles advanced states.

return: {void}

adjust( event )   X-Ref
Adjusts the toolbars heights and positions.

Adjusts the toolbars heights and positions based on the scroll position on
the page, the active editor mode and the heights of the editor, admin bar and
side bar.

param: {event} event The event that calls this function.
return: {void}

fullscreenHide()   X-Ref
Resizes the editor and adjusts the toolbars.

return: {void}

initialResize( callback )   X-Ref
Runs the passed function with 500ms intervals.

param: {function} callback The function to run in the timeout.
return: {void}

afterScroll()   X-Ref
Runs adjust after 100ms.

return: {void}

on()   X-Ref
Binds editor expand events on elements.

return: {void}

off()   X-Ref
Unbinds editor expand events.

return: {void}

recalcEditorRect()   X-Ref
Recalculates the bottom and right position of the editor in the DOM.

return: {void}

activate()   X-Ref
Activates the distraction free writing mode.

return: {void}

deactivate()   X-Ref
Deactivates the distraction free writing mode.

return: {void}

isActive()   X-Ref
Returns _isActive.

return: {boolean} Returns true is _isActive is true.

on()   X-Ref
Binds events on the editor for distraction free writing.

return: {void}

off()   X-Ref
Unbinds events on the editor for distraction free writing.

return: {void}

toggle()   X-Ref
Binds or unbinds the editor expand events.

return: {void}

isOn()   X-Ref
Returns the value of _isOn.

return: {boolean} Returns true if _isOn is true.

fadeOut( event )   X-Ref
Fades out all elements except for the editor.

The fading is done based on key presses and mouse movements.
Also calls the fadeIn on certain key presses
or if the mouse leaves the editor.

param: event The event that triggers this function.
return: {void}

fadeIn( event )   X-Ref
Fades all elements back in.

param: event The event that triggers this function.
return: {void}

maybeFadeIn()   X-Ref
Fades in if the focused element based on it position.

return: {void}

hasFocus( $el )   X-Ref
No description

fadeOutAdminBar()   X-Ref
Fades out the admin bar based on focus on the admin bar.

return: {void}

fadeInAdminBar()   X-Ref
Fades in the admin bar.

return: {void}

fadeOutSlug()   X-Ref
Fades out the edit slug box.

return: {void}

fadeInSlug()   X-Ref
Fades in the edit slug box.

return: {void}

toggleViaKeyboard( event )   X-Ref
Triggers the toggle on Alt + Shift + W.

Keycode 87 = w.

param: {event} event The event to trigger the toggle.
return: {void}

focus()   X-Ref
No description

blur()   X-Ref
No description

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1