{"action":"created","issue":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/1266","repository_url":"https://api.github.com/repos/yabwe/medium-editor","labels_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1266/labels{/name}","comments_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1266/comments","events_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1266/events","html_url":"https://github.com/yabwe/medium-editor/issues/1266","id":197548965,"number":1266,"title":"cleanupSpans function corrupting the pasted html (Span element styles are getting removed) ..","user":{"login":"gs-kgopi","id":14162004,"avatar_url":"https://avatars.githubusercontent.com/u/14162004?v=3","gravatar_id":"","url":"https://api.github.com/users/gs-kgopi","html_url":"https://github.com/gs-kgopi","followers_url":"https://api.github.com/users/gs-kgopi/followers","following_url":"https://api.github.com/users/gs-kgopi/following{/other_user}","gists_url":"https://api.github.com/users/gs-kgopi/gists{/gist_id}","starred_url":"https://api.github.com/users/gs-kgopi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gs-kgopi/subscriptions","organizations_url":"https://api.github.com/users/gs-kgopi/orgs","repos_url":"https://api.github.com/users/gs-kgopi/repos","events_url":"https://api.github.com/users/gs-kgopi/events{/privacy}","received_events_url":"https://api.github.com/users/gs-kgopi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-26T07:20:56Z","updated_at":"2017-01-14T21:06:52Z","closed_at":null,"body":"### Description\r\n\r\n**cleanupSpans** function is removing the styles of copied content.\r\n\r\n### Steps to reproduce\r\n\r\n1. Try to copy the content which is having a span tag with inline styles (Copy underline words from [here](http://grammar.yourdictionary.com/punctuation/rules-for-underlining.html))\r\n2. Paste the copied content in editor.\r\n3. We can observe loss of styles (underline in this case)\r\n\r\n**Expected behavior:** Ideally the source formatting should not be lost\r\n\r\n**Actual behavior:** Styles are getting missed (**cleanupSpans** function is moving the span element content to the it's parent.. while doing so the styles are getting lost)\r\n\r\n**Link to an example:** [It's reproducible on the demo page](https://yabwe.github.io/medium-editor/demo.html), \r\n\r\n**Note**: I wan't know, why span element content is getting moved to it's parent element (and removing the span element) ?\r\n\r\n### Versions\r\n\r\n- medium-editor: Any version\r\n- browser: Not browser specific\r\n- OS: Not OS specific\r\n"},"comment":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/comments/272653151","html_url":"https://github.com/yabwe/medium-editor/issues/1266#issuecomment-272653151","issue_url":"https://api.github.com/repos/yabwe/medium-editor/issues/1266","id":272653151,"user":{"login":"Olgagr","id":1297219,"avatar_url":"https://avatars.githubusercontent.com/u/1297219?v=3","gravatar_id":"","url":"https://api.github.com/users/Olgagr","html_url":"https://github.com/Olgagr","followers_url":"https://api.github.com/users/Olgagr/followers","following_url":"https://api.github.com/users/Olgagr/following{/other_user}","gists_url":"https://api.github.com/users/Olgagr/gists{/gist_id}","starred_url":"https://api.github.com/users/Olgagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Olgagr/subscriptions","organizations_url":"https://api.github.com/users/Olgagr/orgs","repos_url":"https://api.github.com/users/Olgagr/repos","events_url":"https://api.github.com/users/Olgagr/events{/privacy}","received_events_url":"https://api.github.com/users/Olgagr/received_events","type":"User","site_admin":false},"created_at":"2017-01-14T21:06:52Z","updated_at":"2017-01-14T21:06:52Z","body":"@nmielnik @j0k3r  The same \"issue\" is reported regularly by different people (see #1226). Maybe we should expose it more in the docs ?"}}
{"actor":{"display_login":"Olgagr"}}