{"action":"created","comment":{"url":"https://api.github.com/repos/samclarke/SCEditor/pulls/comments/28194745","id":28194745,"diff_hunk":"@@ -1414,6 +1430,200 @@ define(function (require) {\n \t\t\t});\n \t\t};\n \n+\n+\t\t/**\n+\t\t * Adds a handle used to remap keys to make them more useful for code\n+\t\t * input\n+\t\t *\n+\t\t * @private\n+\t\t */\n+\t\tvar addBodyCodeInputHandle = function (searchSelectors) {\n+\t\t\t$wysiwygBody.on('keydown', null,\n+\t\t\t{\n+\t\t\t\t'searchSelector': searchSelectors.join(',')\n+\t\t\t}, codeInputHandle);\n+\n+\t\t};\n+\n+\t\t/**\n+\t\t * Adds a handle used to remap keys to make them more useful for\n+\t\t * code input\n+\t\t *\n+\t\t * @private\n+\t\t */\n+\t\tvar codeInputHandle = function (e) {\n+\n+\t\t\tif (e.ctrlKey || e.altKey || e.metaKey) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\n+\t\t\t// For now, only Enter and Tab have defined executions\n+\t\t\tif (e.which !== 13 &&\t// Enter\n+\t\t\t\te.which !== 9\t\t// tab\n+\t\t\t) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\n+\t\t\tif (e.shiftKey && e.which !== 9) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\n+\t\t\trangeHelper.mergeTextNodesAtCaret();\n+\n+\t\t\tvar currentRange = rangeHelper.selectedRange();\n+\n+\t\t\tif (!rangeHelper.getFirstBlockParent().\n+\t\t\t\tmatches(e.data.searchSelector)) {","path":"src/lib/SCEditor.js","position":78,"original_position":78,"commit_id":"97ff1c6dd0fe53c85d9023457250e8be3e000d16","original_commit_id":"97ff1c6dd0fe53c85d9023457250e8be3e000d16","user":{"login":"brunoais","id":639467,"avatar_url":"https://avatars.githubusercontent.com/u/639467?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"body":"Oh right... I forgot... yeah... That could be used.","created_at":"2015-04-11T13:06:34Z","updated_at":"2015-04-11T13:06:34Z","html_url":"https://github.com/samclarke/SCEditor/pull/414#discussion_r28194745","pull_request_url":"https://api.github.com/repos/samclarke/SCEditor/pulls/414","_links":{"self":{"href":"https://api.github.com/repos/samclarke/SCEditor/pulls/comments/28194745"},"html":{"href":"https://github.com/samclarke/SCEditor/pull/414#discussion_r28194745"},"pull_request":{"href":"https://api.github.com/repos/samclarke/SCEditor/pulls/414"}}},"pull_request":{"url":"https://api.github.com/repos/samclarke/SCEditor/pulls/414","id":32631376,"html_url":"https://github.com/samclarke/SCEditor/pull/414","diff_url":"https://github.com/samclarke/SCEditor/pull/414.diff","patch_url":"https://github.com/samclarke/SCEditor/pull/414.patch","issue_url":"https://api.github.com/repos/samclarke/SCEditor/issues/414","number":414,"state":"open","locked":false,"title":"Add a way of making and controlling as code inside an element/tag","user":{"login":"brunoais","id":639467,"avatar_url":"https://avatars.githubusercontent.com/u/639467?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-04T09:28:38Z","updated_at":"2015-04-11T13:06:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e6784d823695a077b226bcb593a74ae21543466","assignee":null,"milestone":{"url":"https://api.github.com/repos/samclarke/SCEditor/milestones/7","html_url":"https://github.com/samclarke/SCEditor/milestones/v1.5.0","labels_url":"https://api.github.com/repos/samclarke/SCEditor/milestones/7/labels","id":752583,"number":7,"title":"v1.5.0","description":"","creator":{"login":"samclarke","id":490870,"avatar_url":"https://avatars.githubusercontent.com/u/490870?v=3","gravatar_id":"","url":"https://api.github.com/users/samclarke","html_url":"https://github.com/samclarke","followers_url":"https://api.github.com/users/samclarke/followers","following_url":"https://api.github.com/users/samclarke/following{/other_user}","gists_url":"https://api.github.com/users/samclarke/gists{/gist_id}","starred_url":"https://api.github.com/users/samclarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samclarke/subscriptions","organizations_url":"https://api.github.com/users/samclarke/orgs","repos_url":"https://api.github.com/users/samclarke/repos","events_url":"https://api.github.com/users/samclarke/events{/privacy}","received_events_url":"https://api.github.com/users/samclarke/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":4,"state":"open","created_at":"2014-08-13T18:10:34Z","updated_at":"2015-04-10T13:18:10Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/samclarke/SCEditor/pulls/414/commits","review_comments_url":"https://api.github.com/repos/samclarke/SCEditor/pulls/414/comments","review_comment_url":"https://api.github.com/repos/samclarke/SCEditor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samclarke/SCEditor/issues/414/comments","statuses_url":"https://api.github.com/repos/samclarke/SCEditor/statuses/97ff1c6dd0fe53c85d9023457250e8be3e000d16","head":{"label":"brunoais:feature/codeInputModeInside","ref":"feature/codeInputModeInside","sha":"97ff1c6dd0fe53c85d9023457250e8be3e000d16","user":{"login":"brunoais","id":639467,"avatar_url":"https://avatars.githubusercontent.com/u/639467?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"repo":{"id":6545972,"name":"SCEditor","full_name":"brunoais/SCEditor","owner":{"login":"brunoais","id":639467,"avatar_url":"https://avatars.githubusercontent.com/u/639467?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brunoais/SCEditor","description":"A lightweight HTML and BBCode WYSIWYG editor","fork":true,"url":"https://api.github.com/repos/brunoais/SCEditor","forks_url":"https://api.github.com/repos/brunoais/SCEditor/forks","keys_url":"https://api.github.com/repos/brunoais/SCEditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brunoais/SCEditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brunoais/SCEditor/teams","hooks_url":"https://api.github.com/repos/brunoais/SCEditor/hooks","issue_events_url":"https://api.github.com/repos/brunoais/SCEditor/issues/events{/number}","events_url":"https://api.github.com/repos/brunoais/SCEditor/events","assignees_url":"https://api.github.com/repos/brunoais/SCEditor/assignees{/user}","branches_url":"https://api.github.com/repos/brunoais/SCEditor/branches{/branch}","tags_url":"https://api.github.com/repos/brunoais/SCEditor/tags","blobs_url":"https://api.github.com/repos/brunoais/SCEditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brunoais/SCEditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brunoais/SCEditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/brunoais/SCEditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brunoais/SCEditor/statuses/{sha}","languages_url":"https://api.github.com/repos/brunoais/SCEditor/languages","stargazers_url":"https://api.github.com/repos/brunoais/SCEditor/stargazers","contributors_url":"https://api.github.com/repos/brunoais/SCEditor/contributors","subscribers_url":"https://api.github.com/repos/brunoais/SCEditor/subscribers","subscription_url":"https://api.github.com/repos/brunoais/SCEditor/subscription","commits_url":"https://api.github.com/repos/brunoais/SCEditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/brunoais/SCEditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/brunoais/SCEditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/brunoais/SCEditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/brunoais/SCEditor/contents/{+path}","compare_url":"https://api.github.com/repos/brunoais/SCEditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brunoais/SCEditor/merges","archive_url":"https://api.github.com/repos/brunoais/SCEditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brunoais/SCEditor/downloads","issues_url":"https://api.github.com/repos/brunoais/SCEditor/issues{/number}","pulls_url":"https://api.github.com/repos/brunoais/SCEditor/pulls{/number}","milestones_url":"https://api.github.com/repos/brunoais/SCEditor/milestones{/number}","notifications_url":"https://api.github.com/repos/brunoais/SCEditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brunoais/SCEditor/labels{/name}","releases_url":"https://api.github.com/repos/brunoais/SCEditor/releases{/id}","created_at":"2012-11-05T14:51:02Z","updated_at":"2013-11-10T20:14:12Z","pushed_at":"2015-04-06T20:47:00Z","git_url":"git://github.com/brunoais/SCEditor.git","ssh_url":"git@github.com:brunoais/SCEditor.git","clone_url":"https://github.com/brunoais/SCEditor.git","svn_url":"https://github.com/brunoais/SCEditor","homepage":"http://www.sceditor.com/","size":6605,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"samclarke:master","ref":"master","sha":"df6c4718469c54d56f0b62bfdefc6fc3399e331d","user":{"login":"samclarke","id":490870,"avatar_url":"https://avatars.githubusercontent.com/u/490870?v=3","gravatar_id":"","url":"https://api.github.com/users/samclarke","html_url":"https://github.com/samclarke","followers_url":"https://api.github.com/users/samclarke/followers","following_url":"https://api.github.com/users/samclarke/following{/other_user}","gists_url":"https://api.github.com/users/samclarke/gists{/gist_id}","starred_url":"https://api.github.com/users/samclarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samclarke/subscriptions","organizations_url":"https://api.github.com/users/samclarke/orgs","repos_url":"https://api.github.com/users/samclarke/repos","events_url":"https://api.github.com/users/samclarke/events{/privacy}","received_events_url":"https://api.github.com/users/samclarke/received_events","type":"User","site_admin":false},"repo":{"id":2067414,"name":"SCEditor","full_name":"samclarke/SCEditor","owner":{"login":"samclarke","id":490870,"avatar_url":"https://avatars.githubusercontent.com/u/490870?v=3","gravatar_id":"","url":"https://api.github.com/users/samclarke","html_url":"https://github.com/samclarke","followers_url":"https://api.github.com/users/samclarke/followers","following_url":"https://api.github.com/users/samclarke/following{/other_user}","gists_url":"https://api.github.com/users/samclarke/gists{/gist_id}","starred_url":"https://api.github.com/users/samclarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samclarke/subscriptions","organizations_url":"https://api.github.com/users/samclarke/orgs","repos_url":"https://api.github.com/users/samclarke/repos","events_url":"https://api.github.com/users/samclarke/events{/privacy}","received_events_url":"https://api.github.com/users/samclarke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samclarke/SCEditor","description":"A lightweight HTML and BBCode WYSIWYG editor","fork":false,"url":"https://api.github.com/repos/samclarke/SCEditor","forks_url":"https://api.github.com/repos/samclarke/SCEditor/forks","keys_url":"https://api.github.com/repos/samclarke/SCEditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samclarke/SCEditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samclarke/SCEditor/teams","hooks_url":"https://api.github.com/repos/samclarke/SCEditor/hooks","issue_events_url":"https://api.github.com/repos/samclarke/SCEditor/issues/events{/number}","events_url":"https://api.github.com/repos/samclarke/SCEditor/events","assignees_url":"https://api.github.com/repos/samclarke/SCEditor/assignees{/user}","branches_url":"https://api.github.com/repos/samclarke/SCEditor/branches{/branch}","tags_url":"https://api.github.com/repos/samclarke/SCEditor/tags","blobs_url":"https://api.github.com/repos/samclarke/SCEditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samclarke/SCEditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samclarke/SCEditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/samclarke/SCEditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samclarke/SCEditor/statuses/{sha}","languages_url":"https://api.github.com/repos/samclarke/SCEditor/languages","stargazers_url":"https://api.github.com/repos/samclarke/SCEditor/stargazers","contributors_url":"https://api.github.com/repos/samclarke/SCEditor/contributors","subscribers_url":"https://api.github.com/repos/samclarke/SCEditor/subscribers","subscription_url":"https://api.github.com/repos/samclarke/SCEditor/subscription","commits_url":"https://api.github.com/repos/samclarke/SCEditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/samclarke/SCEditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/samclarke/SCEditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/samclarke/SCEditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/samclarke/SCEditor/contents/{+path}","compare_url":"https://api.github.com/repos/samclarke/SCEditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samclarke/SCEditor/merges","archive_url":"https://api.github.com/repos/samclarke/SCEditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samclarke/SCEditor/downloads","issues_url":"https://api.github.com/repos/samclarke/SCEditor/issues{/number}","pulls_url":"https://api.github.com/repos/samclarke/SCEditor/pulls{/number}","milestones_url":"https://api.github.com/repos/samclarke/SCEditor/milestones{/number}","notifications_url":"https://api.github.com/repos/samclarke/SCEditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samclarke/SCEditor/labels{/name}","releases_url":"https://api.github.com/repos/samclarke/SCEditor/releases{/id}","created_at":"2011-07-18T16:46:44Z","updated_at":"2015-04-10T18:47:33Z","pushed_at":"2015-04-09T19:55:47Z","git_url":"git://github.com/samclarke/SCEditor.git","ssh_url":"git@github.com:samclarke/SCEditor.git","clone_url":"https://github.com/samclarke/SCEditor.git","svn_url":"https://github.com/samclarke/SCEditor","homepage":"http://www.sceditor.com/","size":8212,"stargazers_count":223,"watchers_count":223,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":94,"forks":103,"open_issues":94,"watchers":223,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samclarke/SCEditor/pulls/414"},"html":{"href":"https://github.com/samclarke/SCEditor/pull/414"},"issue":{"href":"https://api.github.com/repos/samclarke/SCEditor/issues/414"},"comments":{"href":"https://api.github.com/repos/samclarke/SCEditor/issues/414/comments"},"review_comments":{"href":"https://api.github.com/repos/samclarke/SCEditor/pulls/414/comments"},"review_comment":{"href":"https://api.github.com/repos/samclarke/SCEditor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samclarke/SCEditor/pulls/414/commits"},"statuses":{"href":"https://api.github.com/repos/samclarke/SCEditor/statuses/97ff1c6dd0fe53c85d9023457250e8be3e000d16"}}}}