1
0
-1

Hi,

 

I'm trying to create a custom renderer like the color coded fonts from https://handsontable.com/features

documentation from Spreadsheet isn't clear on how to apply it in the custom settings. Is there any examples that I can follow?

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hi, 

      You can just paste the following code in your column format. 

      {{
          renderer : function(hotInstance, TD, row, col, prop, value) {
              var colors = {
                Red: '#e87677',
                Green: '#66e100',
                Blue: '#00a7fe',
                Purple: '#6623e2',
                Orange: '#ffad24',
                Yellow: '#ffe300',
              };
              TD.style.color = colors[value];
              TD.textContent = value;
          }
      }}

       

      Best regards.

        CommentAdd your comment...
      1.  
        1
        0
        -1

        perfect! thanks.

          CommentAdd your comment...