Skip to content

Support inline format of Prawn in Text and TextBlock #5

Description

@hidakatsuya

Prawn's inline formatting:
http://rubydoc.info/gems/prawn/0.12.0/Prawn/Text:text

Support formats:

  • Bold: <b>bold</b>
  • Italic: <i>italic</i>
  • Underline: <u>underline</u>
  • Strikethrough: <strikethrough>strikethrough</strikethrough>
  • Subscript, Superscript: <superscript>super</superscript>, <subscript>sub</subscript>
  • Font style - Size, CharacterSpacing: <font size="24">font style</font>
  • Text color: <color rgb="#ff0000">color</color>
  • Link: <link href="http://www.thinreports.org">thinreports.org</link>

Support table:

Format TextBlock in global TextBlock in List Text
<b> Yes Yes Yes
<i> Yes Yes Yes
<u> Yes Yes Yes
<strikethrough> Yes Yes Yes
<sub> Yes Yes Yes
<sup> Yes Yes Yes
<font> Yes Yes Yes
<color> Yes Yes Yes
<link> Yes Yes Yes

Example:

page.item(:text).value('<b>ThinReports</b> official site is <i>thinreports.org</i>')

=> ThinReports official site is thinreports.org.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions