{"action":"created","issue":{"url":"https://api.github.com/repos/mechio/takana/issues/58","labels_url":"https://api.github.com/repos/mechio/takana/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/mechio/takana/issues/58/comments","events_url":"https://api.github.com/repos/mechio/takana/issues/58/events","html_url":"https://github.com/mechio/takana/issues/58","id":49443332,"number":58,"title":"Restricted to Sublime Text?","user":{"login":"danielbayley","id":7797479,"avatar_url":"https://avatars.githubusercontent.com/u/7797479?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbayley","html_url":"https://github.com/danielbayley","followers_url":"https://api.github.com/users/danielbayley/followers","following_url":"https://api.github.com/users/danielbayley/following{/other_user}","gists_url":"https://api.github.com/users/danielbayley/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbayley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbayley/subscriptions","organizations_url":"https://api.github.com/users/danielbayley/orgs","repos_url":"https://api.github.com/users/danielbayley/repos","events_url":"https://api.github.com/users/danielbayley/events{/privacy}","received_events_url":"https://api.github.com/users/danielbayley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-11-19T19:40:51Z","updated_at":"2015-01-14T13:02:15Z","closed_at":null,"body":"Is there any way this can be adapted to work in a Coda plugin or Atom package?"},"comment":{"url":"https://api.github.com/repos/mechio/takana/issues/comments/69912646","html_url":"https://github.com/mechio/takana/issues/58#issuecomment-69912646","issue_url":"https://api.github.com/repos/mechio/takana/issues/58","id":69912646,"user":{"login":"barnaby","id":480673,"avatar_url":"https://avatars.githubusercontent.com/u/480673?v=3","gravatar_id":"","url":"https://api.github.com/users/barnaby","html_url":"https://github.com/barnaby","followers_url":"https://api.github.com/users/barnaby/followers","following_url":"https://api.github.com/users/barnaby/following{/other_user}","gists_url":"https://api.github.com/users/barnaby/gists{/gist_id}","starred_url":"https://api.github.com/users/barnaby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barnaby/subscriptions","organizations_url":"https://api.github.com/users/barnaby/orgs","repos_url":"https://api.github.com/users/barnaby/repos","events_url":"https://api.github.com/users/barnaby/events{/privacy}","received_events_url":"https://api.github.com/users/barnaby/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T13:02:15Z","updated_at":"2015-01-14T13:02:15Z","body":"Making a new editor integration is actually really easy if you're using javascript.\r\n\r\nWe use [nssocket](https://github.com/foreverjs/nssocket) for editor <-> takana communication over TCP.\r\n\r\nAn editor sends two types of messages to takana's [EditorManager](https://github.com/mechio/takana/blob/master/lib/editor/manager.coffee):\r\n\r\n- `['buffer', 'update']` with a payload consisting of a `path` to a stylesheet and the current editor `buffer` as a string. This tells takana that it should re-render the stylesheet with the given buffer (when a user changes the stylesheet).  \r\n- `['buffer', 'reset']` with a payload consisting of a `path` to a stylesheet. This tells takana that it should re-render the stylsheet using the file from disk (when a user closes a stylesheet without saving)\r\n\r\nI'll add some example code over the next few days, but in the mean time let me know if you have any more questions!\r\n\r\n"}}