An editable in a table cell does not allow to insert a table #745

Closed
evo42 opened this Issue Oct 3, 2012 · 6 comments

3 participants

@evo42
Aloha Editor Association member

@deliminator any ideas on that?

@deliminator

I think there may be a check in the table plugin that checks whether its in a nested table, and if so, doesn't display the button. If I'm right, then it may be easily possible to modifiy the check so that it is limited by the editable and doesn't consider the outer table. I may be wrong though.

@evo42
Aloha Editor Association member

I thought about the same...

The problem is in mayInsertTag() --> canTag1WrapTag2() in selection.js -- it explicitly does "iterate over all DOM elements outside of the editable part"

Do think it's fine to remove the mayInsertTag() check (but leave isEnabled check) in table-plugin.js (around line 227)?
Just leaving the "check wheater we are inside a table" (around line 238) should be sufficient I think...

@deliminator

There is also a table nesting check inside table-plugin.js or table.js. Petro implemented it. I thought that was the problem.

I think, the mayInsertTag and canTag1WrapTag2 check for HTML5 validity. If that is so, and if the nesting isn't HTML5 compliant, then it's not a good idea to remove the check.

@evo42
Aloha Editor Association member

nested tables are allowed in html5 -- just checked with the w3c validator ( http://stackoverflow.com/questions/10297874/html5-validity-of-nested-tables )

@deliminator

Then it's a bug if the mayInsertTag and canTag1WrapTag2 don't return true for nested tables.

@lroggendorff lroggendorff referenced this issue Jul 23, 2013
Merged

Insert table anywhere #962

5 of 8 tasks complete
@evo42 evo42 closed this Oct 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment