core/edit_switch

Description:
  • Controls the edit switch.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Controls the edit switch.

Members

(static, constant) eventTypes

Description:
  • Names of events for core/edit_switch.

Source:
Properties:
Name Type Description
editModeSet String

See event:core/edit_switch/editModeSet

Names of events for core/edit_switch.

(static, constant) init

Description:
  • Add the eventlistener for the editswitch.

Source:

Add the eventlistener for the editswitch.

Methods

(protected, inner) notifyEditModeSet(container, editMode) → {CustomEvent}

Description:
  • Dispatch the editModeSet event after changing the edit mode.

    This event is cancelable.

    The default action is to reload the page after toggling the edit mode.

Source:
Parameters:
Name Type Description
container HTMLElement
editMode bool
Returns:
Type
CustomEvent

(inner) setEditMode(context, setmode) → {Promise}

Description:
  • Change the Edit mode.

Source:
Parameters:
Name Type Description
context number

The contextid that editing is being set for

setmode bool

Whether editing is set or not

Returns:

Resolved with an array file the stored file url.

Type
Promise

(protected, inner) toggleEditSwitch(editSwitch)

Description:
  • Toggle the edit switch

Source:
Parameters:
Name Type Description
editSwitch HTMLElement

Events

core/edit_switch/editModeSet

Description:
  • An event triggered when the edit mode toggled.

Source:
Properties:
Name Type Description
target HTMLElement

The switch used to toggle the edit mode

detail object
Properties
Name Type Description
editMode bool
Type:
  • CustomEvent