Expand all

ve.ui.CodeMirrorPreferencesPage

Extends

Constructor

new ve.ui.CodeMirrorPreferencesPage(name, [config]) #

Page of VisualEditor's options dialog for CodeMirror's preferences.

The fields come from the active controller's supportedPreferences, and changes go through setPreference(), which applies them to the controller as well as storing them. Preferences locked with CodeMirrorPreferences#lockPreference are omitted rather than shown disabled, since they are locked precisely because they can have no effect here.

The other pages in that dialog edit the document, so the dialog's staging applies or discards them. These are user preferences, saved through the API, so nothing stages them: changes are buffered here and only written when the dialog is torn down with the 'done' action.

Parameters:

Name Type Attributes Description
name string

Unique symbolic name of page

config Object optional

Configuration options

Source:
Page of VisualEditor's options dialog for CodeMirror's preferences.

Properties

changes :Object.<string, PrefValue> #

Preference values changed since the dialog opened, written on 'done'.

Type:

Source:
Preference values changed since the dialog opened, written on 'done'.

Methods

getFieldsets() → {Array.<OO.ui.FieldsetLayout>} #

Fieldsets, for the dialog's change tracking.

Returns:

Type
Array.<OO.ui.FieldsetLayout>
Source:
Fieldsets, for the dialog's change tracking.

setup(fragment, config) #

Parameters:

Name Type Description
fragment ve.dm.SurfaceFragment
config Object
Source:

teardown([data]) #

Parameters:

Name Type Attributes Description
data Object optional
Properties:
Name Type Attributes Description
action string optional

Dialog action the user closed with

Source: