native-html / plugins

Plugins for react-native-render-html
MIT License
55 stars 18 forks source link

[table-plugin] Set text-align in tableStyleSpecs #27

Open KestasVenslauskas opened 3 years ago

KestasVenslauskas commented 3 years ago

Oath

I swear that I have completed these tasks before submitting:

Enhancement

As title says there is no options to change text alignment in table cell by default it uses 'center'. Example on iOS

jsamr commented 3 years ago

@KestasVenslauskas That would be a nice addition. In the meantime, you can use cssRules prop and inject any custom CSS!

ferasabufares commented 3 years ago

this table html code dose not showing because it contain this align="left" border="1" cellspacing="0" style="width:822.75pt" how can i remove or ignored all table style table align="left" border="1" cellspacing="0" style="width:822.75pt"

`

      <tr>
        <th>Entry Header 1</th>
        <th>Entry Header 2</th>
        <th>Entry Header 3</th>
      </tr>
      <tr>
        <td>Entry First Line 1</td>
        <td>Entry First Line 2</td>
        <td>Entry First Line 3</td>
      </tr>
      <tr>
        <td>Entry Second Line 1</td>
        <td>Entry Second Line 2</td>
        <td>Entry Second Line 3</td>
      </tr>
      <tr>
        <td>Entry Third Line 1</td>
        <td>Entry Third Line 2</td>
        <td>Entry Third Line 3</td>
      </tr>
    </table>
    `
jsamr commented 3 years ago

@ferasabufares Please avoid threadjacking. If you have questions, you can ping us in the official Discord channel. Thank you!