Reply To: Applying styles to select variables in a string

PennController for IBEX Forums Support Applying styles to select variables in a string Reply To: Applying styles to select variables in a string

#6172
Jeremy
Keymaster

Hi,

You can use the <strong> HTML tag to surround the part that you want to print in bold. Here’s what it would look like with the code you give (updated to use PennController’s more modern syntax)

Template( "my_table.csv" ,
  variable => newTrial( "my_trials",
    newText("example_sentence", variable.subject+" "+variable.verb+" "+variable.adjective+" <strong>"+variable.object+"</strong>")
      .css("font-size", "25px")
      .center()
      .print()

Let me know if you have questions

Jeremy