Grapesjs: Table <thead> and <tbody> tag gets Omitted

Created on 23 Nov 2017  路  6Comments  路  Source: artf/grapesjs

Hello,
There is new issue with GrapesJS (maybe). I've created new component using bm.add() in which I've used a table element with <thead> and <tbody> tags. But when getting html using editor.getHtml() method, the <thead> and <tbody> tags gets ommited. Can you please help?

screenshot from 2017-11-23 10-16-20

screenshot from 2017-11-23 10-14-28

enhancement help wanted outdated

All 6 comments

@fsaiyedOB yeah, I've made the table component like this because at that moment of writing the sorter was acting differently and it was messy ordering rows with tbody-like elements around. Currently, dealing with tables it's not my priority but I'll leave this issue open in case someone else would like to do so

Hi @artf - I can probably take a look at this at some point. I've started by just removing the "Clean table rows from non rows" section in the table component (lines 54-68). Can you point me in the right direction of what problems this causes that need to be addressed?

@ryandeba right start :) The main problem I was facing initially it was with the sorting so, for the rest, I'd probably update the current droppable with just ['tbody', 'thead', 'tfoot'], and create 3 simple components:
ComponentTableBody, ComponentTableHead, ComponentTableFoot which basically accept only <tr>s inside and could be dropped only inside <table>s

Thanks! I'll try to get started on this in the next few days.

Merged #606

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

desilvaNSP picture desilvaNSP  路  3Comments

YashPrince picture YashPrince  路  3Comments

adam-gpc picture adam-gpc  路  3Comments

kosirm picture kosirm  路  3Comments

tribulant picture tribulant  路  3Comments