Hello,
Currently, we propose to display editors to the user in different form (text or wysiwyg), according to the configuration.
The details of how an editor is displayed are documented here.
But, while the current configuration allows to configure the preferred editor type at different levels (e.g., wiki/space/user), the configuration does not take into account the usage of the editor. In other words, all editors are considered equals and changing the configuration will impact all of them.
This has some limitations. For instance, it is not possible to configure a different editor type specifically for the comments.
What I propose is to enrich the editor type configuration with the notion of XClass property. Technically, this implies adding a new propertyReference
field in EditorBindingClass
.
The following logic would be applied to select the displayed editor type (the new steps are highlighted in bold). In summary, an EditorBindingClass
object with a matching propertyReference
takes precedence over other EditorBindingClass
objects.
- if a TextArea property in a XClass has an editor type defined, its value is used
- if a
EditorBindingClass
instance with a matchingpropertyReference
anddataType
exists for the current user, its value is used - if a
EditorBindingClass
instance with a matchingpropertyReference
anddataType
exists in the current nest space, its value is used - if a
EditorBindingClass
instance with a matchingpropertyReference
anddataType
exists in the current wiki, its value is used - if a
EditorBindingClass
instance with an emptypropertyReference
and a matchingdataType
exists for the current user, its value is used - if a
EditorBindingClass
instance with an emptypropertyReference
and a matchingdataType
exists in the current nest space, its value is used - if a
EditorBindingClass
instance with an emptypropertyReference
and a matchingdataType
exists in the current wiki, its value is used - if a matching configuration key exists in
xwiki.properties
, its value is used - if the current user has defined a preferred editor to use, its value is used
- if the wiki has a defined preferred editor to use, its value is used
WDYT?