This is such a huge frig I am almost embarrassed to put it up here, but here goes....
Basically we have a service running on the server that created a data feed for our customers, so we wanted to have the servers update the customers case with key information (like number of records etc) once the data feed has been prepared. What would have been nice is if we could have given the new events we were creating a different "look and feel" similar to the one that appears when you send and email. We therefore used the email markup as a template and used the XMLAPI to insert the events, but as the thread above describes adding HTML via the FB XML Api is currently unsupported.
To get around this I did the following:
- Install the BugMonkey plugin
- Then insert the following code into the javascript area of a a new customization:
var replace = document.querySelectorAll("div[id*='bugeventBody']");
for (var i = 0; i < replace.length; i++) {
if (replace[i].innerHTML.match(/<div[^<]*?class\s?=\s?(?:"|\")[\s\w]*?decodeme[\s\w]*?(?:"|\")/gism)) {
var decoded = $("").html(replace[i].innerHTML).text();
replace[i].innerHTML = decoded;
}
}
This works by using javascript to locate any event that you have added via the XMLAPI that is contained within a parent tag that has the class "decodeme" i.e.
<div id="someid" class="decodeme email">
......
</div>
Once located the javascript then proceeds to decode and the text contained within the event body.
Fingers crossed the FC boys come up with a more elegant solution soon!
Simon Parsons
MarabouStork ltd