Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    That HTML code would have to replace every occurence of the desired word in the table. Due to the extra HTML code, the CSS code can then recognize the word and add the extra styling.

    Regards,
    Tobias

    Thread Starter digbymaass

    (@digbymaass)

    Yes I realise that but FAQ implies that I can place various things in various places to achieve the highlighting of a particular cell value automatically. I can put the custom css in the right place but what follows in the instructions I don’t know how to achieve. The html of the table isn’t available to edit.
    Where do I place <span class="hilite">your important value</span>?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you put that into your table content, i.e. into one of the table cells on the “Edit” screen of the table.

    Regards,
    Tobias

    Thread Starter digbymaass

    (@digbymaass)

    All that did was place the contents of the span into that cell and style it.
    Are you saying you have to manually place it into each of the cells containing the value you want to style?

    I want it to be automatic! Sadly I think I have misinterpreted the FAQ!
    Oh well, at least I know how to do manually!

    Thanks anyway
    Digby

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    correct, this method allows you to manually highlight words.
    I don’t have a solution for doing it automatically, sorry ??
    For that, you’d need some custom PHP code that for example hooks into the tablepress_cell_content plugin filter hook and adds that HTML code around the desired words.

    Regards,
    Tobias

    Thread Starter digbymaass

    (@digbymaass)

    PHP hooks and coding are where my skills end!
    If anyone else who is good at that would be interested enough to write it that would be great! Highlighting (or changing the background color) of the row that a particular word appears in would be equally useful.

    Thread Starter digbymaass

    (@digbymaass)

    Here’s a workaround:
    Export the table as html
    Open in browser
    Select all in the browser window
    Open a new excel doc
    Paste into it
    Do a search and replace for the desired cell content replacing it with <span class="hilite">your important value here</span>
    Save the doc as .csv
    Reimport it into Tablepress.

    Quicker than it sounds! Don’t think it would be possible to highlight a row this way. If you are starting with an excel document then obviously you can do the search and replace first. Our use of it would be to highlight our running club name in a table of results. In a big race this could be quite a few instances.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that’s a great suggestion for this! I should have thought of this!
    Very nice! Thanks for sharing this!

    Best wishes,
    Tobias

    Hi Tobias,

    thanks!
    class=”hilite”>GOAL</span>
    code works great!

    I just want to know if there any possibility to use instead of class=”hilite” another phrase because i want the cell in green not the word.

    Before I tried this code
    .tablepress-id-1 .row-2 .column-8 {
    background-color: #23cc37;;
    }
    and it worked perfect for me! I just had the problem that I have to add new entries on the top of my table so the row changed….

    Any idea?
    Is it maybe possible to write direct in the cell a code which changed the color of this cell?

    I′m looking forward

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no, sorry, changing the background color of a cell is only possible with CSS code, but not with that method of adding code into the actual cell ??
    That’s just a result of how CSS/HTML code work, I’m afraid.

    Regards,
    Tobias

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Baffled by custom CSS FAQ answer to highlight content’ is closed to new replies.