Class Bdo


@Bean(typeName="bdo") public class Bdo extends HtmlElementMixed
DTO for an HTML <bdo> element.

The bdo element represents a span of text that is to be formatted in a different direction than the surrounding text. It is used to override the bidirectional algorithm and explicitly set the direction of text. The bdo element requires a dir attribute to specify the text direction, which can be "ltr" (left-to-right) or "rtl" (right-to-left).

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Right-to-left text Bdo rtl = bdo("rtl", "مرحبا بالعالم"); // Left-to-right text Bdo ltr = bdo("ltr", "Hello World"); // Mixed direction text Bdo mixed = bdo("rtl", "Hello ", bdo("ltr", "World"), " مرحبا"); // Hebrew text with explicit direction Bdo hebrew = bdo("rtl", "שלום עולם"); // Arabic text with explicit direction Bdo arabic = bdo("rtl", "مرحبا بالعالم"); // Styled bidirectional text Bdo styled = bdo("rtl", "نص باللغة العربية") ._class("bidi-text") .style("color: blue;"); // Numbers with explicit direction Bdo numbers = bdo("rtl", "١٢٣٤٥");

The following convenience methods are provided for constructing instances of this bean:

See Also: