[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

(no description)

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

Defines 34 functions

  textEditorResize()
  getHeights()
  mceGetCursorOffset()
  mceKeyup()
  mceScroll()
  mceFullscreenToggled()
  mceShow()
  mceHide()
  toggleAdvanced()
  adjust()
  fullscreenHide()
  initialResize()
  afterScroll()
  on()
  off()
  recalcEditorRect()
  activate()
  deactivate()
  isActive()
  on()
  off()
  toggle()
  isOn()
  fadeOut()
  fadeIn()
  maybeFadeIn()
  hasFocus()
  fadeOutAdminBar()
  fadeInAdminBar()
  fadeOutSlug()
  fadeInSlug()
  toggleViaKeyboard()
  focus()
  blur()

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.

returns: {void}
since: 4.6.1

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.

returns: {void}
since: 4.0.0

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

returns: {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.
returns: {void}
since: 4.0.0

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.
returns: {void}
since: 4.1.0

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

param: {event} event The FullscreenStateChanged event.
returns: {void}
since: 4.1.0

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.

returns: {void}
since: 4.0.0

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.

returns: {void}
since: 4.0.0

toggleAdvanced()   X-Ref
Toggles advanced states.

returns: {void}
since: 4.1.0

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.
returns: {void}
since: 4.0.0

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

returns: {void}
since: 4.0.0

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

param: {function} callback The function to run in the timeout.
returns: {void}
since: 4.0.0

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

returns: {void}
since: 4.0.0

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

returns: {void}
since: 4.0.0

off()   X-Ref
Unbinds editor expand events.

returns: {void}
since: 4.0.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

isActive()   X-Ref
Returns _isActive.

returns: {boolean} Returns true is _isActive is true.
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {boolean} Returns true if _isOn is true.
since: 4.1.0

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.
returns: {void}
since: 4.1.0

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

param: event The event that triggers this function.
returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

hasFocus( $el )   X-Ref
No description

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

Keycode 87 = w.

param: {event} event The event to trigger the toggle.
returns: {void}
since: 4.1.0

focus()   X-Ref
No description

blur()   X-Ref
No description



Generated: Mon Sep 23 01:00:03 2019 Cross-referenced by PHPXref 0.7.1