{"action":"created","issue":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/1140","repository_url":"https://api.github.com/repos/yabwe/medium-editor","labels_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1140/labels{/name}","comments_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1140/comments","events_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1140/events","html_url":"https://github.com/yabwe/medium-editor/issues/1140","id":164911457,"number":1140,"title":"How to get multiple line selection node","user":{"login":"ankur0890","id":1263424,"avatar_url":"https://avatars.githubusercontent.com/u/1263424?v=3","gravatar_id":"","url":"https://api.github.com/users/ankur0890","html_url":"https://github.com/ankur0890","followers_url":"https://api.github.com/users/ankur0890/followers","following_url":"https://api.github.com/users/ankur0890/following{/other_user}","gists_url":"https://api.github.com/users/ankur0890/gists{/gist_id}","starred_url":"https://api.github.com/users/ankur0890/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankur0890/subscriptions","organizations_url":"https://api.github.com/users/ankur0890/orgs","repos_url":"https://api.github.com/users/ankur0890/repos","events_url":"https://api.github.com/users/ankur0890/events{/privacy}","received_events_url":"https://api.github.com/users/ankur0890/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-11T19:10:30Z","updated_at":"2016-07-24T05:46:02Z","closed_at":null,"body":"Suppose I have two paragraphs\r\n\r\nParagraph1\r\n\r\nParagraph2\r\n\r\nI selected both the paragraphs. I want to get what all nodes which has been selected. Focus node just returns me single paragraph. Ideally it should be two paragraphs as I have selected both. Is there any other way to get this?\r\n\r\n<img width=\"898\" alt=\"screen shot 2016-07-12 at 12 38 28 am\" src=\"https://cloud.githubusercontent.com/assets/1263424/16743286/2cb1e548-47c9-11e6-9c59-77b9e263c8b1.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/comments/234759280","html_url":"https://github.com/yabwe/medium-editor/issues/1140#issuecomment-234759280","issue_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1140","id":234759280,"user":{"login":"nmielnik","id":2444240,"avatar_url":"https://avatars.githubusercontent.com/u/2444240?v=3","gravatar_id":"","url":"https://api.github.com/users/nmielnik","html_url":"https://github.com/nmielnik","followers_url":"https://api.github.com/users/nmielnik/followers","following_url":"https://api.github.com/users/nmielnik/following{/other_user}","gists_url":"https://api.github.com/users/nmielnik/gists{/gist_id}","starred_url":"https://api.github.com/users/nmielnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmielnik/subscriptions","organizations_url":"https://api.github.com/users/nmielnik/orgs","repos_url":"https://api.github.com/users/nmielnik/repos","events_url":"https://api.github.com/users/nmielnik/events{/privacy}","received_events_url":"https://api.github.com/users/nmielnik/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T05:46:02Z","updated_at":"2016-07-24T05:46:02Z","body":"Are you attempting to get a reference to the actual nodes themselves, or just a copy of the html within the selection?\r\n\r\n`MediumEditor.selection.getSelectionHtml(document)` is helper method that will return you all of the html within the selection as a raw html string.\r\nFor your example it would return the string `\"<p>Paragraph 1</p><p>Paragraph 2</p>\"`\r\n\r\n`MediumEditor.selection.getSelectedElements(document)` is a helper method that will return you a reference to all of the elements within the selection.\r\nFor your example, it would return an array with 2 elements in it (the 2 `<p>` elements)."}}
{"actor":{"display_login":"nmielnik"}}