Manual:$wgContentHandlerTextFallback
Jump to navigation
Jump to search
Content Models and Handlers |
---|
MediaWiki allows for page content types other than wikitext. It offers built-in support for JavaScript, CSS, JSON and plain text. Extensions can use MediaWiki's ContentHandler mechanism to add new content models for accepting different formats and controlling how they are rendered, stored and edited. |
![]() |
![]() |
![]() |
Support and development
|
ContentHandler: $wgContentHandlerTextFallback | |
---|---|
How to react if a plain text version of a non-text Content object is requested using ContentHandler::getContentText() |
|
Introduced in version: | 1.21.0 |
Removed in version: | still in use |
Allowed values: | (one of the allowed parameters) |
Default value: | 'ignore' |
Other settings: Alphabetical | By function |
Allowed parameters[edit]
Depending on the value, the following action is taken when Content is not a TextContent object:
'ignore'
-ContentHandler::getContentText
returns null'fail'
- Throw an MWException'serialize'
- Use the Content objectsserialize
method to get a string