{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/draft-js/issues/388","repository_url":"https://api.github.com/repos/facebook/draft-js","labels_url":"https://api.github.com/repos/facebook/draft-js/issues/388/labels{/name}","comments_url":"https://api.github.com/repos/facebook/draft-js/issues/388/comments","events_url":"https://api.github.com/repos/facebook/draft-js/issues/388/events","html_url":"https://github.com/facebook/draft-js/pull/388","id":154575905,"number":388,"title":"Tree block structure","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":[{"url":"https://api.github.com/repos/facebook/draft-js/labels/CLA%20Signed","name":"CLA Signed","color":"009900"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-05-12T20:38:46Z","updated_at":"2016-05-17T02:53:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/draft-js/pulls/388","html_url":"https://github.com/facebook/draft-js/pull/388","diff_url":"https://github.com/facebook/draft-js/pull/388.diff","patch_url":"https://github.com/facebook/draft-js/pull/388.patch"},"body":"👷 WIP\r\n\r\nThis PR is related to #143. \r\n\r\nThe main goal is to support a tree block structure (for example for tables, markdown blockquote, etc).\r\n\r\nThe goal is also to not break compatibility with people already using Draft, by adding a `blockMap` property to `ContentBlock` (same type as the one in `ContentState`).\r\n\r\n### Editing Workflow\r\n\r\n(Similar to Google Docs)\r\n\r\nSimilar to `RichUtils`, we should provide a `RichDeepUtils` (so that we don't break compatibility):\r\n\r\n- Pressing `Enter` should continue splitting the block (with the same parent)\r\n- Pressing `Shift+Enter` (For example in a List) should create a new child block.\r\n- (to complete)\r\n\r\n### TODOs\r\n\r\n- [x] Support tree block structure in `convertFromRaw`\r\n- [ ] Support exporting tree block `convertToRaw`\r\n- [x] Render recursively blocks using `DraftEditorBlock` and `DraftEditorBlocks`\r\n- [x] Adapt offset on blocks to follow new convention\r\n- [x] Adapt modifier to resolve block correctly\r\n- [ ] Adapt tests\r\n\r\nCC @mitermayer"},"comment":{"url":"https://api.github.com/repos/facebook/draft-js/issues/comments/219606663","html_url":"https://github.com/facebook/draft-js/pull/388#issuecomment-219606663","issue_url":"https://api.github.com/repos/facebook/draft-js/issues/388","id":219606663,"user":{"login":"mitermayer","id":1042131,"avatar_url":"https://avatars.githubusercontent.com/u/1042131?v=3","gravatar_id":"","url":"https://api.github.com/users/mitermayer","html_url":"https://github.com/mitermayer","followers_url":"https://api.github.com/users/mitermayer/followers","following_url":"https://api.github.com/users/mitermayer/following{/other_user}","gists_url":"https://api.github.com/users/mitermayer/gists{/gist_id}","starred_url":"https://api.github.com/users/mitermayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitermayer/subscriptions","organizations_url":"https://api.github.com/users/mitermayer/orgs","repos_url":"https://api.github.com/users/mitermayer/repos","events_url":"https://api.github.com/users/mitermayer/events{/privacy}","received_events_url":"https://api.github.com/users/mitermayer/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T02:53:18Z","updated_at":"2016-05-17T02:53:18Z","body":"@SamyPesse that can be done like that, we just need to make sure that modifiers accept a blockRenderMap as option. This is kinda how we are doing internally to figure out the containers to wrap content."}}