Expand all

mw.libs.ve.MWTempWikitextEditorWidget

Constructor

new mw.libs.ve.MWTempWikitextEditorWidget(config) #

MediaWiki temporary wikitext editor widget

This widget can be used to show the user a basic editing interface while VE libraries are still loading.

It has a similar API to OO.ui.InputWidget, but is designed to be loaded before any core VE code or dependencies, e.g. OOUI.

Parameters:

Name Type Description
config Object

Configuration options

Properties:
Name Type Description
value string

Raw wikitext to edit

Source:

MediaWiki temporary wikitext editor widget

This widget can be used to show the user a basic editing interface while VE libraries are still loading.

Methods

adjustSize() → {mw.libs.ve.MWTempWikitextEditorWidget}chainable #

Expand the height of the text to fit the contents

Source:

Returns:

Type
mw.libs.ve.MWTempWikitextEditorWidget
Expand the height of the text to fit the contents

getRange() → {Object} #

Get the selection range

Source:

Returns:

Object containing numbers 'from' and 'to'

Type
Object
Get the selection range

getValue() → {string} #

Source:

Returns:

Raw, possibly edited wikitext

Type
string

moveCursorToStart() → {mw.libs.ve.MWTempWikitextEditorWidget}chainable #

Focus the input and move the cursor to the start.

Source:

Returns:

Type
mw.libs.ve.MWTempWikitextEditorWidget
Focus the input and move the cursor to the start.