Help:Content Model
Jump to navigation
Jump to search
| Info by
| |
|---|---|
| Log | protect · upload · move · contentmodel · delete
|
| Tag | mw-rollback · mw-contentmodelchange · mw-revert · mw-revert-tag · mw-undo
|
| Driver's Manual | ||||||||||||
| Page | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| New • Search • Info • Move • Delete | ||||||||||||
| Editing | ||||||||||||
| ||||||||||||
| Account | ||||||||||||
| Account • Preferences | ||||||||||||
| Directory... | ||||||||||||
A page's content model defines how it is treated and parsed by the software. Most are of the standard, wikitext rich-text format, while interface-related scripts and style sheets necessitate their own dedicated handlers.
The active content model of a page is displayed in its page info. When possible,[1] admins with the editcontentmodel right can convert it using the ChangeContentModel menu.
Options
| Model | Handler[2] | Format(s) | Source | Editor | Notes |
|---|---|---|---|---|---|
wikitext
|
WikitextContentHandler | text/x-wiki | Core | Wiki | Rich text format[3] |
Sanitized CSSsanitized-css
|
TemplateStylesContentHandler | text/css | TemplateStyles | Code | More restricted than css; Disables certain properties so template-based style editing can safely be extended beyond admin-level. See <templatestyles>.
|
JavaScriptjavascript
|
JavaScriptContentHandler | text/js | Core | Code | Supports JQuery and related libraries. |
JSONjson
|
JsonContentHandler | application/json | Core | Code | Ideal for extension development.[3] Limited local use at this time. |
CSScss
|
CssContentHandler | text/css | Core | Code | |
Textplain text
|
TextContentHandler | text/plain | Core | Wiki | Limited local use at this time. |
| GadgetDefinition | GadgetDefinitionContentHandler | application/json | Gadgets | Code | See Help:Gadgets |
| Scribunto | ScribuntoContent | text/plain | Scribunto | Code | Only for Module: namespace and won't appear as option elsewhere.
|
References
- ↑ "Changing a page's content model" - Help:ChangeContentModel, MediaWiki, www.mediawiki.org.
- ↑ "Core content handlers" - Content handlers, MediaWiki, www.mediawiki.org.
- ↑ 3.0 3.1 "Background" - Help:ChangeContentModel, MediaWiki, www.mediawiki.org.

