Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
With Magnolia 5.5.6, the placeholder text field has been deprecated in favor of the "universal"
placeholder
property, see Common field properties.
The placeholder text field is provided by the Content Editor module, which is an EE Pro module.
The is similar to the text field and provides an additional property named
placeholder
.
The property's value, which is i18nable, will displayed in the field before any text has been entered in the field by the user.
class: info.magnolia.editor.app.field.PlaceholderTextFieldDefinition
The placeholder text field is useful in the apps based on the Content editor such as the Stories app:
It can also be used in a dialog for a component:
fields: - name: citedPerson class: info.magnolia.editor.app.field.PlaceholderTextFieldDefinition # label: Cited person # placeholder: The author of the quote ...
Node name | Value |
---|---|
fields | |
citedPerson | |
class | info.magnolia.editor.app.field.PlaceholderTextFieldDefinition |
You do not have to provide the
placeholder
and label
properties in the definition. Instead provide their translations in a message bundle.
You can use text field properties and the placeholder
property in the field's definition:
<field name> | The name of field. |
| optional The placeholder text to be displayed in the empty field. The field is optional, but you should provide a translation or a hard-coded label, otherwise the empty field will display its auto-generated 18n key instead. |