Merge "Add 'ParsoidModules' as a top-level core attribute in extension.json"
This commit is contained in:
commit
ca6ec5a4ee
2 changed files with 71 additions and 0 deletions
|
|
@ -1124,6 +1124,76 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"ParsoidModules": {
|
||||
"type": "array",
|
||||
"description": "List of extension modules to be registered with the Parsoid wikitext parser",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The fully-qualified name of a class implementing Wikimedia\\Parsoid\\Ext\\ExtensionModule"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"description": "An object factory specification for a class implementing Wikimedia\\Parsoid\\Ext\\ExtensionModule",
|
||||
"properties": {
|
||||
"factory": {
|
||||
"type": ["string", "array"],
|
||||
"description": "A factory function to be called to create an ExtensionModule. This should be omitted if a class is specified."
|
||||
},
|
||||
"class": {
|
||||
"type": "string",
|
||||
"description": "The fully-qualified class name of a class implemeting Wikimedia\\Parsoid\\Ext\\ExtensionModule. This should be omitted if a factory is specified."
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"description": "The arguments passed to the ExtensionModule constructor or factory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"description": "A Parsoid extension module configuration array",
|
||||
"properties": {
|
||||
"domProcessors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Object factory specification of a class implementing Wikimedia\\Parsoid\\Ext\\DOMProcessor"
|
||||
}
|
||||
},
|
||||
"styles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "Additional ResourceLoader styles to include"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "An extension tag",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the extension tag",
|
||||
"required": "true"
|
||||
},
|
||||
"handler": {
|
||||
"description": "An object factory specification of a class extending Wikimedia\\Parsoid\\Ext\\ExtensionTagHandler"
|
||||
},
|
||||
"options": {
|
||||
"type": "object",
|
||||
"description": "Additional Parsoid processing configuration for this extension tag"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"description":"Registration information for other extensions",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ class ExtensionProcessor implements Processor {
|
|||
* @var string[]
|
||||
*/
|
||||
protected const CORE_ATTRIBS = [
|
||||
'ParsoidModules',
|
||||
'RestRoutes',
|
||||
'SkinOOUIThemes',
|
||||
'SearchMappings',
|
||||
|
|
|
|||
Loading…
Reference in a new issue