{"action":"created","issue":{"url":"https://api.github.com/repos/summernote/summernote/issues/303","repository_url":"https://api.github.com/repos/summernote/summernote","labels_url":"https://api.github.com/repos/summernote/summernote/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/summernote/summernote/issues/303/comments","events_url":"https://api.github.com/repos/summernote/summernote/issues/303/events","html_url":"https://github.com/summernote/summernote/issues/303","id":29423104,"number":303,"title":"Onpase event to clear formatting","user":{"login":"JackPoint","id":1968505,"avatar_url":"https://avatars.githubusercontent.com/u/1968505?v=3","gravatar_id":"","url":"https://api.github.com/users/JackPoint","html_url":"https://github.com/JackPoint","followers_url":"https://api.github.com/users/JackPoint/followers","following_url":"https://api.github.com/users/JackPoint/following{/other_user}","gists_url":"https://api.github.com/users/JackPoint/gists{/gist_id}","starred_url":"https://api.github.com/users/JackPoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackPoint/subscriptions","organizations_url":"https://api.github.com/users/JackPoint/orgs","repos_url":"https://api.github.com/users/JackPoint/repos","events_url":"https://api.github.com/users/JackPoint/events{/privacy}","received_events_url":"https://api.github.com/users/JackPoint/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/summernote/summernote/labels/discussion","name":"discussion","color":"bfdadc"},{"url":"https://api.github.com/repos/summernote/summernote/labels/documentation","name":"documentation","color":"009800"},{"url":"https://api.github.com/repos/summernote/summernote/labels/feature-request","name":"feature-request","color":"5319e7"},{"url":"https://api.github.com/repos/summernote/summernote/labels/important","name":"important","color":"660000"}],"state":"open","locked":false,"assignee":{"login":"hackerwins","id":2059311,"avatar_url":"https://avatars.githubusercontent.com/u/2059311?v=3","gravatar_id":"","url":"https://api.github.com/users/hackerwins","html_url":"https://github.com/hackerwins","followers_url":"https://api.github.com/users/hackerwins/followers","following_url":"https://api.github.com/users/hackerwins/following{/other_user}","gists_url":"https://api.github.com/users/hackerwins/gists{/gist_id}","starred_url":"https://api.github.com/users/hackerwins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackerwins/subscriptions","organizations_url":"https://api.github.com/users/hackerwins/orgs","repos_url":"https://api.github.com/users/hackerwins/repos","events_url":"https://api.github.com/users/hackerwins/events{/privacy}","received_events_url":"https://api.github.com/users/hackerwins/received_events","type":"User","site_admin":false},"assignees":[{"login":"hackerwins","id":2059311,"avatar_url":"https://avatars.githubusercontent.com/u/2059311?v=3","gravatar_id":"","url":"https://api.github.com/users/hackerwins","html_url":"https://github.com/hackerwins","followers_url":"https://api.github.com/users/hackerwins/followers","following_url":"https://api.github.com/users/hackerwins/following{/other_user}","gists_url":"https://api.github.com/users/hackerwins/gists{/gist_id}","starred_url":"https://api.github.com/users/hackerwins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackerwins/subscriptions","organizations_url":"https://api.github.com/users/hackerwins/orgs","repos_url":"https://api.github.com/users/hackerwins/repos","events_url":"https://api.github.com/users/hackerwins/events{/privacy}","received_events_url":"https://api.github.com/users/hackerwins/received_events","type":"User","site_admin":false}],"milestone":null,"comments":29,"created_at":"2014-03-14T10:19:57Z","updated_at":"2016-07-01T00:16:58Z","closed_at":null,"body":"Is it possible to add an on paste event? I wanna remove all styles when someone copy pastes a text to the editor. If there is an event like this, I can try to build that.\r\n\r\nOr is there an other (easyer) way to clear formatting when someone paste text from an other editor?"},"comment":{"url":"https://api.github.com/repos/summernote/summernote/issues/comments/229823549","html_url":"https://github.com/summernote/summernote/issues/303#issuecomment-229823549","issue_url":"https://api.github.com/repos/summernote/summernote/issues/303","id":229823549,"user":{"login":"dusthazard","id":17347168,"avatar_url":"https://avatars.githubusercontent.com/u/17347168?v=3","gravatar_id":"","url":"https://api.github.com/users/dusthazard","html_url":"https://github.com/dusthazard","followers_url":"https://api.github.com/users/dusthazard/followers","following_url":"https://api.github.com/users/dusthazard/following{/other_user}","gists_url":"https://api.github.com/users/dusthazard/gists{/gist_id}","starred_url":"https://api.github.com/users/dusthazard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dusthazard/subscriptions","organizations_url":"https://api.github.com/users/dusthazard/orgs","repos_url":"https://api.github.com/users/dusthazard/repos","events_url":"https://api.github.com/users/dusthazard/events{/privacy}","received_events_url":"https://api.github.com/users/dusthazard/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T00:16:58Z","updated_at":"2016-07-01T00:16:58Z","body":"Working version for me:\r\n\r\n```\r\n        $(\".js-summernote\").on(\"summernote.paste\",function(e,ne) {\r\n        \r\n          var bufferText = ((ne.originalEvent || ne).clipboardData || window.clipboardData).getData('Text');\r\n          ne.preventDefault();\r\n          document.execCommand('insertText', false, bufferText);\r\n        \r\n        });\r\n```\r\nCombo of @AliPnhyn and @septembermd - many thanks. Works in ff and chrome"}}
{"actor":{"display_login":"dusthazard"}}