{"action":"created","issue":{"url":"https://api.github.com/repos/thijsw/angular-medium-editor/issues/34","labels_url":"https://api.github.com/repos/thijsw/angular-medium-editor/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/thijsw/angular-medium-editor/issues/34/comments","events_url":"https://api.github.com/repos/thijsw/angular-medium-editor/issues/34/events","html_url":"https://github.com/thijsw/angular-medium-editor/pull/34","id":79069278,"number":34,"title":"Rework directive to integrate better with ngModel","user":{"login":"mpolichette","id":2925660,"avatar_url":"https://avatars.githubusercontent.com/u/2925660?v=3","gravatar_id":"","url":"https://api.github.com/users/mpolichette","html_url":"https://github.com/mpolichette","followers_url":"https://api.github.com/users/mpolichette/followers","following_url":"https://api.github.com/users/mpolichette/following{/other_user}","gists_url":"https://api.github.com/users/mpolichette/gists{/gist_id}","starred_url":"https://api.github.com/users/mpolichette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpolichette/subscriptions","organizations_url":"https://api.github.com/users/mpolichette/orgs","repos_url":"https://api.github.com/users/mpolichette/repos","events_url":"https://api.github.com/users/mpolichette/events{/privacy}","received_events_url":"https://api.github.com/users/mpolichette/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-21T16:25:05Z","updated_at":"2015-11-25T16:07:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thijsw/angular-medium-editor/pulls/34","html_url":"https://github.com/thijsw/angular-medium-editor/pull/34","diff_url":"https://github.com/thijsw/angular-medium-editor/pull/34.diff","patch_url":"https://github.com/thijsw/angular-medium-editor/pull/34.patch"},"body":"Hey! Thanks for starting this project out.  \r\n\r\nI was having a few issues using the angular medium editor and have addressed the following issues with this pull request.\r\n\r\n1.  Unsafe re-creation of Medium Editor.  I removed the memory leak caused by multiple editors being initialized for a single element.  This was breaking keyboard commands every *other* time you emptied the buffer. (cmd+b would fire for each one, and when there was an even number of editors, they would cancel eachother out).\r\n\r\n2.  Unable to use ngModel validators like `required` because even an empty buffer was setting the model to `<p><br><p>`   This still happens, but I've written an ngModel.$isEmpty which detects an empty buffer and reports it so.\r\n\r\n3. Removed multiple ways of setting options.  If we are creating a watcher for bindOptions either way, we might as well just use that watcher.  (both `options` and `bind-options` were being evaluated every time `bind-options` changed anyway)\r\n\r\nI took a bit of a large refactor on the codebase for this one, so I hope thats not too bothersome, let me know if there is a reason you don't like this solution.  I don't think I have any regressions, it appears like the placeholder and toolbar are performing correctly in the evergreen browsers I tested.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/thijsw/angular-medium-editor/issues/comments/159656393","html_url":"https://github.com/thijsw/angular-medium-editor/pull/34#issuecomment-159656393","issue_url":"https://api.github.com/repos/thijsw/angular-medium-editor/issues/34","id":159656393,"user":{"login":"simison","id":87168,"avatar_url":"https://avatars.githubusercontent.com/u/87168?v=3","gravatar_id":"","url":"https://api.github.com/users/simison","html_url":"https://github.com/simison","followers_url":"https://api.github.com/users/simison/followers","following_url":"https://api.github.com/users/simison/following{/other_user}","gists_url":"https://api.github.com/users/simison/gists{/gist_id}","starred_url":"https://api.github.com/users/simison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simison/subscriptions","organizations_url":"https://api.github.com/users/simison/orgs","repos_url":"https://api.github.com/users/simison/repos","events_url":"https://api.github.com/users/simison/events{/privacy}","received_events_url":"https://api.github.com/users/simison/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T16:07:41Z","updated_at":"2015-11-25T16:07:41Z","body":"Been testing this now and seems to work great.\r\n\r\nThanks @mpolichette!"}}