HTML5 Text Formatting When Sending Data From CasparCG Client

#1
I have recently switched from using Flash to Adobe Edge Animate and starting to learn this new way of creating CasparCG templates.
I have been using E2C to pass data to the template.
The text from the HTML file renders correctly in CasparCG, until I pass data from the client, when it changes to some unknown font and changes in color from white to black.
Could someone advise why this may be happening.
Many thanks

Re: HTML5 Text Formatting When Sending Data From CasparCG Client

#8
Dear jyeomans,

I have worked out that I need to pass the the HTML formatting as well as the actual data to the clienteg:

<p style=\"margin: 0px;\">​<span style=\"font-family: Arial, Helvetica, sans-serif; font-size: 48px; color: rgb(255, 255, 255); text-transform: capitalize;\">New Data</span></p>

So I now have this working, but is there an easier way than having to pass all this style format to every field - as you can see there are many fields !!

Thanks for your ongoing help - much appreciated

Re: HTML5 Text Formatting When Sending Data From CasparCG Client

#9
https://www.dropbox.com/s/hctl41zz8uyri ... 2.zip?dl=0

so the problem is that the function that replaces the text in the span actually replaces the parent div. with a new div that has no style.
the new one uses the default for the html doc.

when what you want to do is to just change the text in the span that is all ready there.

i used a jquery selector to target the text and changed the text.

Code: Select all

$('#Stage_Row1_Name1>p>span').text('newText');
text in the span that is a child of the p that is a child of the Stage_Row1_Name1 div

Re: HTML5 Text Formatting When Sending Data From CasparCG Client

#10
still messing with this.
in 2015 edge animate.
your text for name1 is in a span in a p in a div.
but when i built it in edge 2014 it was text in the div. and the change from the client change the text
if you double click on the Name1 Element
it will open the code window and you can
wipe out all the code
<p style="margin: 0px;">​<span style="font-size: 48px; color: rgb(255, 255, 255);">Name2</span></p>
and replace it with just the text you want to see in a blank template.
then when you change it in the client with a key of Row1_Name1 it should work fine now.
i tested it it worked for me.

sorry i forgot you were changing this form the client
it is little stuff like this that keeps me using 2014.

Re: HTML5 Text Formatting When Sending Data From CasparCG Client

#11
Dear jyeomans,
Thanks ever so much for this assistance - I have now got everything working perfectly in CC14 but in the CC15 version when I double click on the text element it doesn't open up a code window to be able to remove the styling info?
Is this in a different menu in CC15 - I can't seem to find an option to show this, or is it just not available?
I may just keep on using CC14 !!
Once again thanks for your help
Matthew