Cronto message custom formatting

This chapter explains how to customize the visual appearance of Cronto messages and lists the supported special characters.

Visual appearance

You can change the visual appearance of Cronto transaction approval messages by adding Cronto-specific formatting tags to the strings_*.properties files (see Customizing text elements in the Transaction Approval module).

About Cronto message formatting tags:

  • A tag applies only to the text element in which it appears - either title, key or value.
  • Tags can be placed anywhere within the text element.

The following table lists the formatting types with corresponding formatting tags:

Formatting type

Available formatting tags

Text colors

  • {RED}
  • {BLUE}
  • {GREEN}
  • {BLACK}
  • {DEFAULT_COLOR}

Text alignments

  • {LEFT}
  • {CENTER}
  • {RIGHT}
  • {DEFAULTTEXT_ALIGNMENT}

Font styles

  • {BOLD}
  • {ITALIC}
  • {INVERSE}

Example

When you set the styling as follows...

 
Example
Title{CENTER}&{BOLD}Amount=200 EUR{RED}{RIGHT}&Comments={GREEN}None

...the output will look like this:

Special characters

Cronto supports only a limited set of special characters in text elements, which are listed in the table below. Any special characters not included in this list will appear as question mark (“?”) in the transaction approval messages.

 
Notice

This list applies only to Cronto functionality implemented using the CrontoEngine.

Special characters supported by Cronto:

Special character

Javascript Unicode escape sequence

Description

À

\u00C0

A with grave

Â

\u00C2

A with circumflex

Ä

\u00C4

A with umlaut

È

\u00C8

E with grave

É

\u00C9

E with acute

Ê

\u00CA

E with circumflex

Ë

\u00CB

E with umlaut

Ì

\u00CC

I with grave

Î

\u00CE

I with circumflex

Ï

\u00CF

I with umlaut

Ò

\u00D2

O with grave

Ó

\u00D3

O with acute

Ô

\u00D4

O with circumflex

Ö

\u00D6

O with umlaut

Ù

\u00D9

U with grave

Û

\u00DB

U with circumflex

Ü

\u00DC

U with umlaut

Ÿ

\u0178

Y with diaeresis

Ç

\u00C7

C with cedilla

Œ

\u0152

Ligature oe

ß

\u00DF

Sharp s

ª

\u00AA

Feminine ordinal indicator

º

\u00BA

Masculine ordinal indicator

:

\u003A

Colon

,

\u002C

Comma

.

\u002E

Full stop

-

\u002D

Hyphen

_

\u005F

Underscore

'

\u0027

Apostrophe

!

Exclamation mark

/

Forward slash

*

Asterisk

+

Plus

=

Equals

%

Percent

@

At

§

\u00A7

Section

&

Ampersand

£

\u00A3

Pound

\u20AC

Euro

$

Dollar

?

Question mark

(

Open bracket

)

Close bracket

«

\u00AB

Left-pointing double angle quotation mark

»

\u00BB

Right-pointing double angle quotation mark

<

Less-than

>

Greater-than

{

Left curly bracket

}

Right curly bracket

\u2026

Horizontal ellipsis