{"action":"created","issue":{"url":"https://api.github.com/repos/daviferreira/medium-editor/issues/533","labels_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/533/labels{/name}","comments_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/533/comments","events_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/533/events","html_url":"https://github.com/daviferreira/medium-editor/pull/533","id":66291611,"number":533,"title":"Add textarea support, fixes #103","user":{"login":"daviferreira","id":38787,"avatar_url":"https://avatars.githubusercontent.com/u/38787?v=3","gravatar_id":"","url":"https://api.github.com/users/daviferreira","html_url":"https://github.com/daviferreira","followers_url":"https://api.github.com/users/daviferreira/followers","following_url":"https://api.github.com/users/daviferreira/following{/other_user}","gists_url":"https://api.github.com/users/daviferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/daviferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviferreira/subscriptions","organizations_url":"https://api.github.com/users/daviferreira/orgs","repos_url":"https://api.github.com/users/daviferreira/repos","events_url":"https://api.github.com/users/daviferreira/events{/privacy}","received_events_url":"https://api.github.com/users/daviferreira/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-04T08:21:56Z","updated_at":"2015-04-27T18:51:18Z","closed_at":"2015-04-05T00:25:36Z","pull_request":{"url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/533","html_url":"https://github.com/daviferreira/medium-editor/pull/533","diff_url":"https://github.com/daviferreira/medium-editor/pull/533.diff","patch_url":"https://github.com/daviferreira/medium-editor/pull/533.patch"},"body":"Native basic textarea support."},"comment":{"url":"https://api.github.com/repos/daviferreira/medium-editor/issues/comments/96778096","html_url":"https://github.com/daviferreira/medium-editor/pull/533#issuecomment-96778096","issue_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/533","id":96778096,"user":{"login":"nmielnik","id":2444240,"avatar_url":"https://avatars.githubusercontent.com/u/2444240?v=3","gravatar_id":"","url":"https://api.github.com/users/nmielnik","html_url":"https://github.com/nmielnik","followers_url":"https://api.github.com/users/nmielnik/followers","following_url":"https://api.github.com/users/nmielnik/following{/other_user}","gists_url":"https://api.github.com/users/nmielnik/gists{/gist_id}","starred_url":"https://api.github.com/users/nmielnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmielnik/subscriptions","organizations_url":"https://api.github.com/users/nmielnik/orgs","repos_url":"https://api.github.com/users/nmielnik/repos","events_url":"https://api.github.com/users/nmielnik/events{/privacy}","received_events_url":"https://api.github.com/users/nmielnik/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T18:51:18Z","updated_at":"2015-04-27T18:51:18Z","body":"First of all, this is a great catch @bborn so thanks!\r\n\r\nThe reason why we're doing things in this order is that we create the Toolbar inside `initElements()`.  The toolbar will look through all the extensions that implement a `getButton()` and call it so that they can be inserted into the toolbar.\r\n\r\nExtensions assume that `.init()` is called before `.getButton()`, so this is why `initCommands()` (which calls `.init()` on each extension) must be called before `initElements()`.\r\n\r\nI believe the solution here is to extract the toolbar initiating code out of `initElements()` into its own `initToolbar()` method.  Once that's done, we can change the `setup()` function to this:\r\n\r\n```js\r\nsetup: function () {\r\n  ...\r\n  // Call initialization helpers\r\n  initElements.call(this);\r\n  initCommands.call(this);\r\n  initToolbar.call(this); // New method we've created\r\n  ...\r\n}\r\n```\r\n\r\nIf anyone has a chance to open a pull request for this in the meantime, that'd be great!"}}