Placeholders for Empty Elements

Oxygen XML Editor plugin displays the element name as pseudo-content for empty elements if the Show placeholders for empty elements option is enabled in the Author preferences page and there is no before or after content set in the CSS for this type of element. There are two CSS properties that can be used to control the placeholders (-oxy-placeholder-content and -oxy-show-placeholder).

-oxy-placeholder-content CSS Property

To control the displayed pseudo-content for empty elements, you can use the -oxy-placeholder-content CSS property.

The following example would change the keyword element to be displayed as key:

keyword{
    -oxy-placeholder-content:"key";
}

-oxy-show-placeholder CSS Property

The -oxy-show-placeholder property allows you to decide whether or not the placeholder will be shown. The possible values are:

  • always - Always display placeholders.
  • default - Always display placeholders if before or after content are not set is CSS.
  • inherit - The placeholders are displayed according to the Show placeholders for empty elements option (if before and after content is not declared).

Note

Deprecated properties show-placeholder and placeholder-content are also supported.

Was this helpful?