0

I have added background color to th in the below table it is working fine normally. But, if we use same code in ckeditor the style is not applying

<table>
  <thead>
    <tr>
      <th colspan="5" style="text-align:center;
	              background: green;color:#fff;">SPECIAL CLASSES TIME TABLE
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>Firstname</th>
      <th>Lastname</th>
      <th>Email</th>
    </tr>
    <tr>
      <td>John</td>
      <td>Doe</td>
      <td>[email protected]</td>
    </tr>
    <tr>
      <td>Mary</td>
      <td>Moe</td>
      <td>[email protected]</td>
    </tr>
    <tr>
      <td>July</td>
      <td>Dooley</td>
      <td>[email protected]</td>
    </tr>
  </tbody>
</table>

1 Answer 1

1

Create css class of your applied style and setting the contentCss of ckedior as below

CKEDITOR.config.contentsCss = '/mycustom.css';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.