Jodit editor style override html code style

142 Views Asked by At

I'm using Jodit-react editor.

I want to paste some html code into the editor with table, but it seems like the style of head and row is being override by the style of editor.

Please copy and paste this html code into Jodit editor's official page.

<div class="wrapper">
   <table class="table_wrapper" >
      <thead>
         <tr>
            <th><span>First</span></th>
            <th><span>Second</span></th>
            <th><span>Third</span></th>
         </tr>
      </thead>
      <tbody>
         <tr>
            <td>1st</td>
            <td>2nd</td>
            <td>3rd</td>
         </tr>
      </tbody>
   </table>
</div>

In this simple table, I didn't specify any style of th and td, so I expect there should have no style. Instead, jodit editor style on table have override the default style and give it a different style that I don't expect.

This is what I expect

This is result from jodit editor

Is there a way to keep both the jodit editor style, and at the same time keep the default style of html that I paste into the editor?

Thanks!

I tried:

  1. Jodit Process paste plugin - But it seems to have no effect, not sure how to properly use it

  2. Add onPaste to grab the paste html content and use applyStyles from jodit editor - onPaste doesn't get any content

0

There are 0 best solutions below