{"action":"created","issue":{"url":"https://api.github.com/repos/cjwirth/RichEditorView/issues/25","labels_url":"https://api.github.com/repos/cjwirth/RichEditorView/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/cjwirth/RichEditorView/issues/25/comments","events_url":"https://api.github.com/repos/cjwirth/RichEditorView/issues/25/events","html_url":"https://github.com/cjwirth/RichEditorView/pull/25","id":126387099,"number":25,"title":"Implement the getSelectedHref method","user":{"login":"mfrawley","id":135666,"avatar_url":"https://avatars.githubusercontent.com/u/135666?v=3","gravatar_id":"","url":"https://api.github.com/users/mfrawley","html_url":"https://github.com/mfrawley","followers_url":"https://api.github.com/users/mfrawley/followers","following_url":"https://api.github.com/users/mfrawley/following{/other_user}","gists_url":"https://api.github.com/users/mfrawley/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrawley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrawley/subscriptions","organizations_url":"https://api.github.com/users/mfrawley/orgs","repos_url":"https://api.github.com/users/mfrawley/repos","events_url":"https://api.github.com/users/mfrawley/events{/privacy}","received_events_url":"https://api.github.com/users/mfrawley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-13T10:24:26Z","updated_at":"2016-01-16T11:42:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cjwirth/RichEditorView/pulls/25","html_url":"https://github.com/cjwirth/RichEditorView/pull/25","diff_url":"https://github.com/cjwirth/RichEditorView/pull/25.diff","patch_url":"https://github.com/cjwirth/RichEditorView/pull/25.patch"},"body":"To add a bit of context, you want a method like this if you select an existing link in your richtext editor and want to edit it. This method allows us to pre-fill out the textfield in the \"edit link\" view controller."},"comment":{"url":"https://api.github.com/repos/cjwirth/RichEditorView/issues/comments/172192283","html_url":"https://github.com/cjwirth/RichEditorView/pull/25#issuecomment-172192283","issue_url":"https://api.github.com/repos/cjwirth/RichEditorView/issues/25","id":172192283,"user":{"login":"cjwirth","id":1579644,"avatar_url":"https://avatars.githubusercontent.com/u/1579644?v=3","gravatar_id":"","url":"https://api.github.com/users/cjwirth","html_url":"https://github.com/cjwirth","followers_url":"https://api.github.com/users/cjwirth/followers","following_url":"https://api.github.com/users/cjwirth/following{/other_user}","gists_url":"https://api.github.com/users/cjwirth/gists{/gist_id}","starred_url":"https://api.github.com/users/cjwirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjwirth/subscriptions","organizations_url":"https://api.github.com/users/cjwirth/orgs","repos_url":"https://api.github.com/users/cjwirth/repos","events_url":"https://api.github.com/users/cjwirth/events{/privacy}","received_events_url":"https://api.github.com/users/cjwirth/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T11:42:22Z","updated_at":"2016-01-16T11:42:22Z","body":"I agree, these 2 methods are pretty general purpose. I implemented something similar in my own app as kind of a plugin. \r\n\r\nHowever, one reason I didn't merge it in, is because I wasn't sure what the most natural behavior would be when asking what the selectedHref is if the selection has more than the href, or more than one href.\r\n\r\nFor example, if the strikeouts signify where the selection is:\r\n\r\n-----\r\n\r\nThis is some text ~~with a <a href=\"http://example.com\">link to~~ something</a> inside it\r\n\r\n-----\r\n\r\nThis ~~certain <a href=\"http://github.com\">link</a> is different than <a href=\"http://github.com/cjwirth/RichEditorView\">this</a>~~ one\r\n\r\n---\r\n"}}