Jump to content

My code.


Fletch

Recommended Posts

Posted

I'm not very swift at 'code'. I'm trying to create a tagged resource that has 2 different colors in it. The end result should look like this:

 

MU + create + ist

 

My code looks like this.

 

MU + <font color="#ff0000">design</font> + ist

 

It seems the color designated by the 'text frame editor' overrides everything. Can this be done?

Posted

Fletch,

Not knowing exactly how you are trying to return this resource here are a couple options:

1) You need check the box at the top of the script area for the rule that states "Treat return strings as tagged text".

 

2) If you data is specifically returning the Tagged text resource, try indicating that your data source includes tagged text.

 

Hope this helps

Posted
I'm not very swift at 'code'. I'm trying to create a tagged resource that has 2 different colors in it. The end result should look like this:

 

MU + create + ist

 

My code looks like this.

 

MU + <font color="#ff0000">design</font> + ist

 

It seems the color designated by the 'text frame editor' overrides everything. Can this be done?

No, the tagged markup always always overrides what's in the Text Editor. But, the tags you're using here are not the correct ones to change colors. If you click "Compose," you should see a message telling you as much.

 

Try this instead:

return 'MU<color rgb="ff0000">design</color>ist';

Actually, this tag, <color rgb="ff0000">, is exactly the example shown in the FusionPro Tags Reference Guide. The documentation is your friend!

The other way to find out what tags you need, without thumbing through the doc, is to create a new Formatted Text Resource, type in whatever you want in the Text Editor, then click OK and "View Source." This will show you exactly how to create the tags for the styled text that you typed in the editor. (Although admittedly, the Text Editor only uses named colors, so you won't see any <color rgb=***> or <color cmyk=***> tags generated.)

 

Of course, if all you're doing is changing the color of some text, you can just use a Formatted Text Resource to begin with, or even simply change the color in the Text Editor.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...