Forum Discussion

dnlabrado's avatar
dnlabrado
Community Member
3 days ago

Underlining a Word in Storyline

Is it possible that when I choose to "underline" a word I can change the color of the "underline" independent from the color of the word?

1 Reply

  • Nedim's avatar
    Nedim
    Community Member

    I don’t think this is possible using Storyline’s default functionality. However, it can be achieved with JavaScript by targeting a specific word or object via its data-model-id or data-acc-text attribute and applying a different color defined in the script.

    See the example below and the attached Storyline file for reference.

    If only a single word or an entire sentence needs to be underlined, a JavaScript-based solution is fairly straightforward. However, if multiple or non-consecutive words need to be underlined, the implementation becomes more complex. In such cases, I recommend using JavaScript only when a single word or full sentence requires a different underline color. For more complex scenarios, a simpler and approach is to draw line shapes under each word directly in Storyline.

    EDIT:
    You can also underline multiple or non-consecutive words by adjusting the JavaScript, as long as they belong to a single object or text box.