{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/126","repository_url":"https://api.github.com/repos/ckeditor/ckeditor5-design","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/126/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/126/events","html_url":"https://github.com/ckeditor/ckeditor5-design/issues/126","id":132149993,"number":126,"title":"Features: Schema","user":{"login":"scofalik","id":1502228,"avatar_url":"https://avatars.githubusercontent.com/u/1502228?v=3","gravatar_id":"","url":"https://api.github.com/users/scofalik","html_url":"https://github.com/scofalik","followers_url":"https://api.github.com/users/scofalik/followers","following_url":"https://api.github.com/users/scofalik/following{/other_user}","gists_url":"https://api.github.com/users/scofalik/gists{/gist_id}","starred_url":"https://api.github.com/users/scofalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scofalik/subscriptions","organizations_url":"https://api.github.com/users/scofalik/orgs","repos_url":"https://api.github.com/users/scofalik/repos","events_url":"https://api.github.com/users/scofalik/events{/privacy}","received_events_url":"https://api.github.com/users/scofalik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ckeditor/ckeditor5-design/labels/features","name":"features","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2016-02-08T14:04:10Z","updated_at":"2016-02-18T14:45:51Z","closed_at":null,"body":"# Features concept\r\n\r\nThis is a part of Features concept. This issue discusses schema. See also #129.\r\n\r\n## Schema\r\n\r\nSchema is a way to validate and organize elements positioning and occurrence in the Tree Model and Tree View. Generally speaking, for each element, schema says what elements can be contained in them, what attributes can be set on that element, and what attributes can be set on that element's children. Schema may be then used to verify if Tree Model or Tree View is properly built and also can be used to build a proper Tree Model or Tree View.\r\n\r\nDue to flexible and modular architecture of CKEditor5 that is based on \"plug-able\" `Feature`s, which then may introduce custom elements and attributes, it is impossible to create a static, hard-coded schema that will cover all possible features.\r\n\r\nInstead, schema will be (mostly) built on the fly, during `Feature`s initialization. We need a flexible, yet \"easy to use in simple cases\" mechanism for creating schema.\r\n\r\n*(Right now it's hard to say what exactly should be registered to schema, it will be probably used both by converters and commands. On the other hand it is used differently by Tree Model and Tree View. Maybe there should be two separate ways to add rules to schema. Are there any other places that we will also want to use schema?)*"},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/comments/185751140","html_url":"https://github.com/ckeditor/ckeditor5-design/issues/126#issuecomment-185751140","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/126","id":185751140,"user":{"login":"pjasiun","id":1166967,"avatar_url":"https://avatars.githubusercontent.com/u/1166967?v=3","gravatar_id":"","url":"https://api.github.com/users/pjasiun","html_url":"https://github.com/pjasiun","followers_url":"https://api.github.com/users/pjasiun/followers","following_url":"https://api.github.com/users/pjasiun/following{/other_user}","gists_url":"https://api.github.com/users/pjasiun/gists{/gist_id}","starred_url":"https://api.github.com/users/pjasiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjasiun/subscriptions","organizations_url":"https://api.github.com/users/pjasiun/orgs","repos_url":"https://api.github.com/users/pjasiun/repos","events_url":"https://api.github.com/users/pjasiun/events{/privacy}","received_events_url":"https://api.github.com/users/pjasiun/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T14:45:51Z","updated_at":"2016-02-18T14:45:51Z","body":"https://github.com/ckeditor/ckeditor5-core/compare/t/features?expand=1#diff-1b21ae31202733dc0c9c48a31aa51040R21 I do not think that root should be a special type. In can be an element of any type, converted from the DOM element with `contenteditable` attribute. It the DOM element is `div` the model root element will be `div`. If the DOM root element is `h1` the model root element will be `header`. Schema rules will work fine.\r\n\r\nNow, it does not make sense to disallow `inline` in `root`, because if `root` will be header, text can go directly into it."}}