Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

including html tags in text plugin commands

Recommended Posts


if i include a simple html tag like <b> in my TextPlugin command, like this ...:


TweenLite.to(yourElement, 2, {text:"This is the <br>new</b> text", ease:Linear.easeNone});


the "new" text will be displayed bold, BUT for a short period of time the <b> and </b> tag is visible (before it disappears).


Is there a way to make html tags NOT be visible?


Thank you!

Link to comment
Share on other sites

Sorry, the TextPlugin does not support nested html tags like <b>, <strong>, <em> etc. It only works on straight text.


You can create two text elements and tween them separately like so:


var tl = new TimelineLite();

tl.to("span.normal", 1, {text:"welcome to the "})
  .to("span.bold", 1, {text:"BOLD TEXT "})



  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.