{"action":"closed","issue":{"url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/1347","repository_url":"https://api.github.com/repos/froala/wysiwyg-editor","labels_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/1347/labels{/name}","comments_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/1347/comments","events_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/1347/events","html_url":"https://github.com/froala/wysiwyg-editor/issues/1347","id":160946610,"number":1347,"title":"Feature? html.get vs codeView.get","user":{"login":"jpgilchrist","id":5065660,"avatar_url":"https://avatars.githubusercontent.com/u/5065660?v=3","gravatar_id":"","url":"https://api.github.com/users/jpgilchrist","html_url":"https://github.com/jpgilchrist","followers_url":"https://api.github.com/users/jpgilchrist/followers","following_url":"https://api.github.com/users/jpgilchrist/following{/other_user}","gists_url":"https://api.github.com/users/jpgilchrist/gists{/gist_id}","starred_url":"https://api.github.com/users/jpgilchrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpgilchrist/subscriptions","organizations_url":"https://api.github.com/users/jpgilchrist/orgs","repos_url":"https://api.github.com/users/jpgilchrist/repos","events_url":"https://api.github.com/users/jpgilchrist/events{/privacy}","received_events_url":"https://api.github.com/users/jpgilchrist/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-17T18:19:40Z","updated_at":"2016-06-20T11:43:59Z","closed_at":"2016-06-20T11:43:59Z","body":"##### Expected behavior.\r\nI would like a way to generically get the codeView contents even if the codeView itself hasn't been initialized. The problem is that if you call `editor.html.get` while the `editor.codeView.isActive === true` then you don't get the changes. Additionally you cannot call `editor.codeView.get` universally because if the codeView hasn't been initialized then it throws an error:\r\n\r\n```\r\nVM463 code_view.min.js:7 Uncaught TypeError: Cannot read property 'val' of undefined(…)d @ VM463 code_view.min.js:7(anonymous function) \r\n```\r\n\r\nI can do the following to semi resolve the issue:\r\n\r\n```javascript\r\nif (editor.codeView.isActive()) {\r\n  return editor.codeView.get();\r\n}\r\nreturn editor.html.get();\r\n```\r\n\r\nThe problem with this is that the contents are formatted differently. And I would to access the contents in a more consistent manner.\r\n\r\n##### OS.\r\nEl Capitan\r\n\r\n##### Browser.\r\nChrome\r\n"}}
{"actor":{"display_login":"stefanneculai"}}