Skip to content

Text Format

hivakun edited this page Jul 7, 2016 · 7 revisions

Text formatting can be applied to various elements of WText library. More specifically, every element that contains a text information like cells, list items, links, paragraphs and texts.

Example:

Text text = new Text("Italic bold", TextFormat.ITALIC);
text.format(TextFormat.BOLD);
Cell cell = Cells.newCell("Code");
cell.format(TextFormat.CODE);

Available formats are presented in the table below.

Format
WText Code Mediawiki Markup
TextFormat.BOLD '''text'''
TextFormat.ITALIC ''text''
TextFormat.ITALIC_BOLD '''''text'''''
TextFormat.SMALLCAPS {{smallcaps|text}}
TextFormat.CODE <code>text</code>
TextFormat.SMALL <small>text</small>
TextFormat.BIG <big>text</big>
TextFormat.BLOCKQUOTE <blockquote>text</blockquote>
TextFormat.CENTER <center>text</center>

Clone this wiki locally