{"action":"opened","issue":{"url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/145","repository_url":"https://api.github.com/repos/miztroh/wysiwyg-e","labels_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/145/comments","events_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/145/events","html_url":"https://github.com/miztroh/wysiwyg-e/issues/145","id":194981254,"number":145,"title":"Code Tool Is Not Working Correctly ","user":{"login":"hyyan","id":4313420,"avatar_url":"https://avatars.githubusercontent.com/u/4313420?v=3","gravatar_id":"","url":"https://api.github.com/users/hyyan","html_url":"https://github.com/hyyan","followers_url":"https://api.github.com/users/hyyan/followers","following_url":"https://api.github.com/users/hyyan/following{/other_user}","gists_url":"https://api.github.com/users/hyyan/gists{/gist_id}","starred_url":"https://api.github.com/users/hyyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyyan/subscriptions","organizations_url":"https://api.github.com/users/hyyan/orgs","repos_url":"https://api.github.com/users/hyyan/repos","events_url":"https://api.github.com/users/hyyan/events{/privacy}","received_events_url":"https://api.github.com/users/hyyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T14:00:50Z","updated_at":"2016-12-12T14:00:50Z","closed_at":null,"body":"Hello @miztroh \r\n\r\nThanks again for this awesome work .\r\n\r\nThe main issue I am facing currently that I need the code tool to work as users would expect from such a tool , but unfortunately it is not , I have created my own fork of this project and my own code tool , but \r\nI don like the idea of maintaining my own fork of this project as every time I sync the fork with the master brunch  I get new problems and it became really annoying to keep doing this ,\r\n\r\nI have tried also to send a PR but it was not accpeted as it modifies the [sanitize method](https://github.com/miztroh/wysiwyg-e/blob/master/wysiwyg-e.html#L654) \r\n\r\n** The Problem ** \r\n- Creating a new code block creates a new `pre-code` around every line and the code tool can not handle code formatted with code tag only \r\n- Can not create code block from exiting text , the text will be removed then an empty block is created \r\n- Can not use tabs inside code blocks , the editor will create blockquote directly \r\n- The clear command does not clean the code block around the text ,the text is just moved out of the node and the code block is kept\r\n\r\n\r\nI guess the whole problem related to code blocks are coming from the sanitize function in [here](https://github.com/miztroh/wysiwyg-e/blob/master/wysiwyg-e.html#L670-L708)\r\n\r\nI still can not get my head around these lines , why are they needed \r\n\r\nThanks in advance "}}
{"actor":{"display_login":"hyyan"}}