{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/comments/83072198","pull_request_review_id":3937011,"id":83072198,"diff_hunk":"@@ -1,11 +1,68 @@\n import React, { PropTypes } from 'react';\n-import { Editor, EditorState, ContentState } from 'draft-js';\n+import {\n+\tContentState,\n+\tEditor,\n+\tEditorState,\n+\tModifier,\n+} from 'draft-js';\n import { invoke, noop } from 'lodash';\n \n function plainTextContent( editorState ) {\n \treturn editorState.getCurrentContent().getPlainText( '\\n' )\n }\n \n+// contains methods that mirror the methods on Modifier with 2 differences:\n+// 1. operate on EditorState instances\n+// 2. move selection to the natural place following the modification\n+const EditorStateModifier = {\n+\tinsertText( editorState, selection, characters ) {\n+\t\t// this function assumes selection is collapsed\n+\n+\t\tconst afterInsert = EditorState.push(\n+\t\t\teditorState,\n+\t\t\tModifier.insertText(\n+\t\t\t\teditorState.getCurrentContent(), selection, characters","path":"lib/note-content-editor.jsx","position":25,"original_position":25,"commit_id":"abb7fe934e4c7f93c7f75f9b3952fdcde52d3101","original_commit_id":"abb7fe934e4c7f93c7f75f9b3952fdcde52d3101","user":{"login":"nfcampos","id":56902,"avatar_url":"https://avatars.githubusercontent.com/u/56902?v=3","gravatar_id":"","url":"https://api.github.com/users/nfcampos","html_url":"https://github.com/nfcampos","followers_url":"https://api.github.com/users/nfcampos/followers","following_url":"https://api.github.com/users/nfcampos/following{/other_user}","gists_url":"https://api.github.com/users/nfcampos/gists{/gist_id}","starred_url":"https://api.github.com/users/nfcampos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfcampos/subscriptions","organizations_url":"https://api.github.com/users/nfcampos/orgs","repos_url":"https://api.github.com/users/nfcampos/repos","events_url":"https://api.github.com/users/nfcampos/events{/privacy}","received_events_url":"https://api.github.com/users/nfcampos/received_events","type":"User","site_admin":false},"body":"sure thing","created_at":"2016-10-12T18:44:19Z","updated_at":"2016-10-12T18:44:19Z","html_url":"https://github.com/Automattic/simplenote-electron/pull/400#discussion_r83072198","pull_request_url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400","_links":{"self":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/comments/83072198"},"html":{"href":"https://github.com/Automattic/simplenote-electron/pull/400#discussion_r83072198"},"pull_request":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400","id":88647156,"html_url":"https://github.com/Automattic/simplenote-electron/pull/400","diff_url":"https://github.com/Automattic/simplenote-electron/pull/400.diff","patch_url":"https://github.com/Automattic/simplenote-electron/pull/400.patch","issue_url":"https://api.github.com/repos/Automattic/simplenote-electron/issues/400","number":400,"state":"open","locked":false,"title":"added indent/outdent behaviour to editor","user":{"login":"nfcampos","id":56902,"avatar_url":"https://avatars.githubusercontent.com/u/56902?v=3","gravatar_id":"","url":"https://api.github.com/users/nfcampos","html_url":"https://github.com/nfcampos","followers_url":"https://api.github.com/users/nfcampos/followers","following_url":"https://api.github.com/users/nfcampos/following{/other_user}","gists_url":"https://api.github.com/users/nfcampos/gists{/gist_id}","starred_url":"https://api.github.com/users/nfcampos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfcampos/subscriptions","organizations_url":"https://api.github.com/users/nfcampos/orgs","repos_url":"https://api.github.com/users/nfcampos/repos","events_url":"https://api.github.com/users/nfcampos/events{/privacy}","received_events_url":"https://api.github.com/users/nfcampos/received_events","type":"User","site_admin":false},"body":"The tab part of #398 ","created_at":"2016-10-10T11:30:54Z","updated_at":"2016-10-12T18:44:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6d8f20437fa752fe96578b4e730fe56c5f2fbd3","assignee":{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false},"assignees":[{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400/commits","review_comments_url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400/comments","review_comment_url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/simplenote-electron/issues/400/comments","statuses_url":"https://api.github.com/repos/Automattic/simplenote-electron/statuses/abb7fe934e4c7f93c7f75f9b3952fdcde52d3101","head":{"label":"nfcampos:tabs","ref":"tabs","sha":"abb7fe934e4c7f93c7f75f9b3952fdcde52d3101","user":{"login":"nfcampos","id":56902,"avatar_url":"https://avatars.githubusercontent.com/u/56902?v=3","gravatar_id":"","url":"https://api.github.com/users/nfcampos","html_url":"https://github.com/nfcampos","followers_url":"https://api.github.com/users/nfcampos/followers","following_url":"https://api.github.com/users/nfcampos/following{/other_user}","gists_url":"https://api.github.com/users/nfcampos/gists{/gist_id}","starred_url":"https://api.github.com/users/nfcampos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfcampos/subscriptions","organizations_url":"https://api.github.com/users/nfcampos/orgs","repos_url":"https://api.github.com/users/nfcampos/repos","events_url":"https://api.github.com/users/nfcampos/events{/privacy}","received_events_url":"https://api.github.com/users/nfcampos/received_events","type":"User","site_admin":false},"repo":{"id":66679847,"name":"simplenote-electron","full_name":"nfcampos/simplenote-electron","owner":{"login":"nfcampos","id":56902,"avatar_url":"https://avatars.githubusercontent.com/u/56902?v=3","gravatar_id":"","url":"https://api.github.com/users/nfcampos","html_url":"https://github.com/nfcampos","followers_url":"https://api.github.com/users/nfcampos/followers","following_url":"https://api.github.com/users/nfcampos/following{/other_user}","gists_url":"https://api.github.com/users/nfcampos/gists{/gist_id}","starred_url":"https://api.github.com/users/nfcampos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfcampos/subscriptions","organizations_url":"https://api.github.com/users/nfcampos/orgs","repos_url":"https://api.github.com/users/nfcampos/repos","events_url":"https://api.github.com/users/nfcampos/events{/privacy}","received_events_url":"https://api.github.com/users/nfcampos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nfcampos/simplenote-electron","description":"A Simplenote React app packaged in Electron","fork":true,"url":"https://api.github.com/repos/nfcampos/simplenote-electron","forks_url":"https://api.github.com/repos/nfcampos/simplenote-electron/forks","keys_url":"https://api.github.com/repos/nfcampos/simplenote-electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nfcampos/simplenote-electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nfcampos/simplenote-electron/teams","hooks_url":"https://api.github.com/repos/nfcampos/simplenote-electron/hooks","issue_events_url":"https://api.github.com/repos/nfcampos/simplenote-electron/issues/events{/number}","events_url":"https://api.github.com/repos/nfcampos/simplenote-electron/events","assignees_url":"https://api.github.com/repos/nfcampos/simplenote-electron/assignees{/user}","branches_url":"https://api.github.com/repos/nfcampos/simplenote-electron/branches{/branch}","tags_url":"https://api.github.com/repos/nfcampos/simplenote-electron/tags","blobs_url":"https://api.github.com/repos/nfcampos/simplenote-electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nfcampos/simplenote-electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nfcampos/simplenote-electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/nfcampos/simplenote-electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nfcampos/simplenote-electron/statuses/{sha}","languages_url":"https://api.github.com/repos/nfcampos/simplenote-electron/languages","stargazers_url":"https://api.github.com/repos/nfcampos/simplenote-electron/stargazers","contributors_url":"https://api.github.com/repos/nfcampos/simplenote-electron/contributors","subscribers_url":"https://api.github.com/repos/nfcampos/simplenote-electron/subscribers","subscription_url":"https://api.github.com/repos/nfcampos/simplenote-electron/subscription","commits_url":"https://api.github.com/repos/nfcampos/simplenote-electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/nfcampos/simplenote-electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/nfcampos/simplenote-electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/nfcampos/simplenote-electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/nfcampos/simplenote-electron/contents/{+path}","compare_url":"https://api.github.com/repos/nfcampos/simplenote-electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nfcampos/simplenote-electron/merges","archive_url":"https://api.github.com/repos/nfcampos/simplenote-electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nfcampos/simplenote-electron/downloads","issues_url":"https://api.github.com/repos/nfcampos/simplenote-electron/issues{/number}","pulls_url":"https://api.github.com/repos/nfcampos/simplenote-electron/pulls{/number}","milestones_url":"https://api.github.com/repos/nfcampos/simplenote-electron/milestones{/number}","notifications_url":"https://api.github.com/repos/nfcampos/simplenote-electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nfcampos/simplenote-electron/labels{/name}","releases_url":"https://api.github.com/repos/nfcampos/simplenote-electron/releases{/id}","deployments_url":"https://api.github.com/repos/nfcampos/simplenote-electron/deployments","created_at":"2016-08-26T21:15:50Z","updated_at":"2016-08-26T21:15:51Z","pushed_at":"2016-10-11T21:25:04Z","git_url":"git://github.com/nfcampos/simplenote-electron.git","ssh_url":"git@github.com:nfcampos/simplenote-electron.git","clone_url":"https://github.com/nfcampos/simplenote-electron.git","svn_url":"https://github.com/nfcampos/simplenote-electron","homepage":"","size":9331,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"be76628895fcd62e06368b40ee858a5e4ae5ad43","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":41199577,"name":"simplenote-electron","full_name":"Automattic/simplenote-electron","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/simplenote-electron","description":"A Simplenote React app packaged in Electron","fork":false,"url":"https://api.github.com/repos/Automattic/simplenote-electron","forks_url":"https://api.github.com/repos/Automattic/simplenote-electron/forks","keys_url":"https://api.github.com/repos/Automattic/simplenote-electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/simplenote-electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/simplenote-electron/teams","hooks_url":"https://api.github.com/repos/Automattic/simplenote-electron/hooks","issue_events_url":"https://api.github.com/repos/Automattic/simplenote-electron/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/simplenote-electron/events","assignees_url":"https://api.github.com/repos/Automattic/simplenote-electron/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/simplenote-electron/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/simplenote-electron/tags","blobs_url":"https://api.github.com/repos/Automattic/simplenote-electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/simplenote-electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/simplenote-electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/simplenote-electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/simplenote-electron/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/simplenote-electron/languages","stargazers_url":"https://api.github.com/repos/Automattic/simplenote-electron/stargazers","contributors_url":"https://api.github.com/repos/Automattic/simplenote-electron/contributors","subscribers_url":"https://api.github.com/repos/Automattic/simplenote-electron/subscribers","subscription_url":"https://api.github.com/repos/Automattic/simplenote-electron/subscription","commits_url":"https://api.github.com/repos/Automattic/simplenote-electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/simplenote-electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/simplenote-electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/simplenote-electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/simplenote-electron/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/simplenote-electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/simplenote-electron/merges","archive_url":"https://api.github.com/repos/Automattic/simplenote-electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/simplenote-electron/downloads","issues_url":"https://api.github.com/repos/Automattic/simplenote-electron/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/simplenote-electron/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/simplenote-electron/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/simplenote-electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/simplenote-electron/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/simplenote-electron/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/simplenote-electron/deployments","created_at":"2015-08-22T09:06:44Z","updated_at":"2016-10-12T14:28:47Z","pushed_at":"2016-10-11T21:24:51Z","git_url":"git://github.com/Automattic/simplenote-electron.git","ssh_url":"git@github.com:Automattic/simplenote-electron.git","clone_url":"https://github.com/Automattic/simplenote-electron.git","svn_url":"https://github.com/Automattic/simplenote-electron","homepage":"","size":9724,"stargazers_count":883,"watchers_count":883,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":117,"mirror_url":null,"open_issues_count":110,"forks":117,"open_issues":110,"watchers":883,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400"},"html":{"href":"https://github.com/Automattic/simplenote-electron/pull/400"},"issue":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/issues/400"},"comments":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/pulls/400/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/simplenote-electron/statuses/abb7fe934e4c7f93c7f75f9b3952fdcde52d3101"}}}}
{"actor":{"display_login":"nfcampos"}}