Skip to content

Commit ca12eb0

Browse files
committed
rich text styles formatting, fixes #5
1 parent 43edfdf commit ca12eb0

11 files changed

Lines changed: 765 additions & 604 deletions

File tree

docs/images/rich_text.png

18.4 KB
Loading

docs/index.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,38 @@ _Result_
641641

642642
image:fonts.png[]
643643

644+
=== Rich Texts
645+
646+
Apart from setting the font for the whole cell you can create a rich text cell content as well. Instead of `value`
647+
use multiple calls to `text` method which takes optional closure to define the font for the current text run. The font
648+
definition is the same as <<Fonts,above>>.
649+
650+
[source,groovy]
651+
----
652+
cell {
653+
text 'Little'
654+
text ' '
655+
text 'Red', {
656+
color red
657+
size 22
658+
}
659+
text ' '
660+
text 'Riding', {
661+
italic
662+
size 18
663+
}
664+
text ' '
665+
text 'Hood', {
666+
bold
667+
size 22
668+
}
669+
670+
}
671+
----
672+
673+
_Result_
674+
675+
image:rich_text.png[]
644676

645677
=== Data formats
646678
You can assing a data format using the `format` method. Detailed guide how the format works can be found in

0 commit comments

Comments
 (0)