(warning) 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 PlaceholderTextFieldDefinition 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:

Field definition

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

(info) You do not have to provide the placeholder and label properties in the definition. Instead provide their translations in a message bundle.

article-editor/i18n/article-editor-messages_en.properties
articles.editor.articleMetaData.citedPerson.label=Cited person
articles.editor.articleMetaData.citedPerson.placeholder=The author of the quote ...

You can use text field properties and the placeholder property in the field's definition:

<field name>The name of field.

placeholder

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.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))