{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/401","repository_url":"https://api.github.com/repos/ckeditor/ckeditor5","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/401/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/401/events","html_url":"https://github.com/ckeditor/ckeditor5/issues/401","id":207625404,"number":401,"title":"How to check if editor has no content/is empty ?","user":{"login":"oskarwrobel","id":1057056,"avatar_url":"https://avatars.githubusercontent.com/u/1057056?v=3","gravatar_id":"","url":"https://api.github.com/users/oskarwrobel","html_url":"https://github.com/oskarwrobel","followers_url":"https://api.github.com/users/oskarwrobel/followers","following_url":"https://api.github.com/users/oskarwrobel/following{/other_user}","gists_url":"https://api.github.com/users/oskarwrobel/gists{/gist_id}","starred_url":"https://api.github.com/users/oskarwrobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskarwrobel/subscriptions","organizations_url":"https://api.github.com/users/oskarwrobel/orgs","repos_url":"https://api.github.com/users/oskarwrobel/repos","events_url":"https://api.github.com/users/oskarwrobel/events{/privacy}","received_events_url":"https://api.github.com/users/oskarwrobel/received_events","type":"User","site_admin":false},"labels":[{"id":164194252,"url":"https://api.github.com/repos/ckeditor/ckeditor5/labels/type:question","name":"type:question","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2017-02-14T20:19:42Z","updated_at":"2017-02-21T12:40:57Z","closed_at":null,"body":"In most of cases editor will have an empty paragraph on init. So `getData() == ''` will be `false` almost all the time. What if someone adds some spaces or new lines?\r\nFor example, you use CKE as an input to write posts or comments and you want to prevent user of submitting form until `content.trim() == ''`. How to do it?\r\n\r\nMy first thought was to add an option `getData( { trim: true } )` or create method `isEmpty( document )` but @pjasiun and @scofalik pointed out that it won't be so easy because there is no common rule for every feature that defines when feature is empty. Eg. Can table be empty? or image?"},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/comments/281333806","html_url":"https://github.com/ckeditor/ckeditor5/issues/401#issuecomment-281333806","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5/issues/401","id":281333806,"user":{"login":"fredck","id":630060,"avatar_url":"https://avatars.githubusercontent.com/u/630060?v=3","gravatar_id":"","url":"https://api.github.com/users/fredck","html_url":"https://github.com/fredck","followers_url":"https://api.github.com/users/fredck/followers","following_url":"https://api.github.com/users/fredck/following{/other_user}","gists_url":"https://api.github.com/users/fredck/gists{/gist_id}","starred_url":"https://api.github.com/users/fredck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredck/subscriptions","organizations_url":"https://api.github.com/users/fredck/orgs","repos_url":"https://api.github.com/users/fredck/repos","events_url":"https://api.github.com/users/fredck/events{/privacy}","received_events_url":"https://api.github.com/users/fredck/received_events","type":"User","site_admin":false},"created_at":"2017-02-21T12:40:57Z","updated_at":"2017-02-21T12:40:57Z","body":"> Editor#getData( { trim: true } )\r\n\r\nAt the current stage, making `{ trim: true }` configurable is overengineering. We don't even know if anyone needs this (and no real world scenario has been exemplified so far) and it can be included at any moment in the future based on demand."}}
{"actor":{"display_login":"fredck"}}