{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/draft-js/issues/212","repository_url":"https://api.github.com/repos/facebook/draft-js","labels_url":"https://api.github.com/repos/facebook/draft-js/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/facebook/draft-js/issues/212/comments","events_url":"https://api.github.com/repos/facebook/draft-js/issues/212/events","html_url":"https://github.com/facebook/draft-js/issues/212","id":140912958,"number":212,"title":"Tables & Overlapping entities","user":{"login":"SamyPesse","id":845425,"avatar_url":"https://avatars.githubusercontent.com/u/845425?v=3","gravatar_id":"","url":"https://api.github.com/users/SamyPesse","html_url":"https://github.com/SamyPesse","followers_url":"https://api.github.com/users/SamyPesse/followers","following_url":"https://api.github.com/users/SamyPesse/following{/other_user}","gists_url":"https://api.github.com/users/SamyPesse/gists{/gist_id}","starred_url":"https://api.github.com/users/SamyPesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamyPesse/subscriptions","organizations_url":"https://api.github.com/users/SamyPesse/orgs","repos_url":"https://api.github.com/users/SamyPesse/repos","events_url":"https://api.github.com/users/SamyPesse/events{/privacy}","received_events_url":"https://api.github.com/users/SamyPesse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-15T09:02:34Z","updated_at":"2016-03-15T09:02:34Z","closed_at":null,"body":"First of all, thank you for your awesome work :beers: \r\n\r\nI'm currently switching from `CodeMirror + Custom widgets` to `draft-js` for our [GitBook Editor](https://www.gitbook.com/editor).\r\nI've started by implementing a library, [draft-markup](https://github.com/GitbookIO/draft-markup) to parse `Markdown` to `RawContentState`, and `RawContentState` to `Markdown` (or other markup syntaxes). You can see checkout an example at http://gitbookio.github.io/draft-markup/\r\n\r\nI successfully implemented the markdown syntax using the rule of our markdown parser: link, emphasis, image, code, etc. But I'm facing issue on the implementation of tables.\r\n\r\nMy original idea was to parse a table like:\r\n\r\n```markdown\r\n| Col 1 | Col 2 |\r\n| ----- | ----- |\r\n| Cell 1.1 | Cell 1.2 |\r\n| Cell 2.1 | Cell 2.2 |\r\n```\r\n\r\ninto one `TABLE` block with 4 types of entities in it: `TABLE_HEADER`, `TABLE_BODY`, `TABLE_ROW` and `TABLE_CELL`.\r\n\r\nBut It seems that draft-js doesn't support overlapping entities (since `TABLE_CELL` is included inside `TABLE_ROW`, which is included inside `TABLE_BODY`).\r\n\r\nBasically, here is the `RawContentState` when parsing the previous table: https://gist.github.com/SamyPesse/589225b9d6728bf1db6f\r\n\r\nAnd here is the dom generated by `draft-js`:\r\n\r\n![screen shot 2016-03-15 at 09 31 09](https://cloud.githubusercontent.com/assets/845425/13772259/6e26a07e-ea93-11e5-85ef-8dc4dc224e52.png)\r\n\r\nI understand that overlapping entities are not a good idea and should be avoided,but  what would be the advised method for editing table with `draft-js` ?\r\n\r\n"}}