question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table Cell Styles

See original GitHub issue

In Word, when there is a Table, the user applies a Style to the data in the cell. In the Mammoth conversion, the style class is applied to a P element inside the Table TD cell. Is it possible to apply this class to the parent TD instead of the P element inside?

Currently doing this:

<table>
  <tr>
    <td><p class="underline">Eve</p></td>
    <td><p class="underline">Jackson</p></td> 
    <td><p class="underline">94</p></td>
  </tr>
</table>

Is it possible to do this:

<table>
    <tr>
      <td class="underline">Eve</td>
      <td class="underline">Jackson</td> 
      <td class="underline">94</td>
    </tr>
  </table>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mwilliamsoncommented, Feb 7, 2021

Closing since I post-processing is hopefully a sufficient solution.

1reaction
mwilliamsoncommented, Jan 23, 2021

Yes, there are libraries you can use that can parse and manipulate HTML. If you’re in the browser, you could alternatively use the DOM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table and cell styles in InDesign - Adobe Support
A table style is a collection of table formatting attributes, such as table borders and row and column strokes, that can be applied...
Read more >
How To Style a Table with CSS | DigitalOcean
In this tutorial, you will run through an example of styling a element. ... Each cell of the table is contained within a...
Read more >
About Working With Table and Cell Styles | AutoCAD 2021
The default table style, Standard, includes three default cell styles: Title, Header, and Data. The Title and Header cell styles are a Label ......
Read more >
Format an Excel table - Microsoft Support
Select any cell in the table you want to use to create a custom style. On the Home tab, click Format as Table,...
Read more >
A Complete Guide to the Table Element | CSS-Tricks
The individual cells of a table are always one of two elements: <td> or <th> . You can put whatever you want inside...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found