How can change the font size of the Tiledesk widget

I want to increase the font size of the messages sent from the agent/bot of the Live Chat Widget. How can do that?

Currently you must use Javascript and CSS to customize the UI.

Moreover you must use the Tiledesk JS SDK tileDeskAsyncInit function and the events lifecycle described Tiledesk JS SDK events

After importing the standard tiledesk script you must write inside the onInit event (to be sure the Tiledesk iframe is created) a JS script that create on the fly a custom css for the specific div.

Below you can find an example:

<script type="application/javascript">
window.tiledeskSettings =
 (function(d, s, id) {
   var js, fjs = d.getElementsByTagName(s)[0];
   if (d.getElementById(id)) return;
   js = d.createElement(s); = id;
   js.src = "";
   fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'tiledesk-jssdk'));

 window.tileDeskAsyncInit = function() {
    window.tiledesk.on('onInit', function(event_data) {
       console.log("tiledesk started");
       var iframeTiledesk = document.getElementById("tiledeskiframe");

       var style = iframeTiledesk.contentWindow.document.createElement('style');
       style.type = 'text/css';
       style.innerHTML = ' { font-size: 17!important; }';

1 Like