CLEditor - tables support

Hello everybody! Just joined Vanilla world.

I'm using CLEditor and I wanted to use tables in the discussions. However, it's a bit strange. When you copy a table from (for example) Word to the editor, the table works fine. When you save and view the discussion the table dissapears. Then, when you edit the discussion, the table is visible in the edit field.

Is it CLEditor issue or Vanilla can't render tables? Anybody got a fix for that?

Comments

  • Vanilla has no default styling for tables:
    https://github.com/vanilla/vanilla/issues/2139

    You can just add this to your custom.css:

    table {
      border-collapse: collapse;
    }
    td, th {
      border: 1px solid #ccc;
      padding:4pc 8px
    }
    th {
      background: #3994D8;
      border-color: white;
      color: white;
    }
    

    should go well with the default style

  • KarolWKarolW New
    edited November 2014

    Thanks. It works, but there's a side effect: the discussion with the table has a lot of blank empty lines. I guess it's because new lines from the html code of the table are being converted into <br>. How to prevent it?

  • This seems to be a bug, i know this happens with BBcode.

    Can you try switching your inputformatter to markdown?

Sign In or Register to comment.