{"action":"created","issue":{"url":"https://api.github.com/repos/Voog/wysihtml/issues/176","labels_url":"https://api.github.com/repos/Voog/wysihtml/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/Voog/wysihtml/issues/176/comments","events_url":"https://api.github.com/repos/Voog/wysihtml/issues/176/events","html_url":"https://github.com/Voog/wysihtml/issues/176","id":72526039,"number":176,"title":"How to call \"change_view\" programmatically?","user":{"login":"alessandrofrancesconi","id":1595223,"avatar_url":"https://avatars.githubusercontent.com/u/1595223?v=3","gravatar_id":"","url":"https://api.github.com/users/alessandrofrancesconi","html_url":"https://github.com/alessandrofrancesconi","followers_url":"https://api.github.com/users/alessandrofrancesconi/followers","following_url":"https://api.github.com/users/alessandrofrancesconi/following{/other_user}","gists_url":"https://api.github.com/users/alessandrofrancesconi/gists{/gist_id}","starred_url":"https://api.github.com/users/alessandrofrancesconi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alessandrofrancesconi/subscriptions","organizations_url":"https://api.github.com/users/alessandrofrancesconi/orgs","repos_url":"https://api.github.com/users/alessandrofrancesconi/repos","events_url":"https://api.github.com/users/alessandrofrancesconi/events{/privacy}","received_events_url":"https://api.github.com/users/alessandrofrancesconi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-01T21:20:38Z","updated_at":"2015-05-02T11:43:43Z","closed_at":"2015-05-02T11:43:43Z","body":"I would like to implement this sequence in Javascript:\r\n\r\n1) check if the editor is in \"html\" mode\r\n2) if yes, switch it back to \"composer\" mode\r\n\r\nIs there a function for this? Thanks"},"comment":{"url":"https://api.github.com/repos/Voog/wysihtml/issues/comments/98350425","html_url":"https://github.com/Voog/wysihtml/issues/176#issuecomment-98350425","issue_url":"https://api.github.com/repos/Voog/wysihtml/issues/176","id":98350425,"user":{"login":"alessandrofrancesconi","id":1595223,"avatar_url":"https://avatars.githubusercontent.com/u/1595223?v=3","gravatar_id":"","url":"https://api.github.com/users/alessandrofrancesconi","html_url":"https://github.com/alessandrofrancesconi","followers_url":"https://api.github.com/users/alessandrofrancesconi/followers","following_url":"https://api.github.com/users/alessandrofrancesconi/following{/other_user}","gists_url":"https://api.github.com/users/alessandrofrancesconi/gists{/gist_id}","starred_url":"https://api.github.com/users/alessandrofrancesconi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alessandrofrancesconi/subscriptions","organizations_url":"https://api.github.com/users/alessandrofrancesconi/orgs","repos_url":"https://api.github.com/users/alessandrofrancesconi/repos","events_url":"https://api.github.com/users/alessandrofrancesconi/events{/privacy}","received_events_url":"https://api.github.com/users/alessandrofrancesconi/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T11:43:43Z","updated_at":"2015-05-02T11:43:43Z","body":"Done.\r\n\r\n    var editorObject = new wysihtml5.Editor(...);\r\n    //...\r\n    if (editorObject.currentView == 'source') {\r\n        editorObject.fire('change_view', 'composer');\r\n    }"}}