Docs do not describe the actual model.
See original GitHub issueHi there, awesome project first of all!
I found that the docs do not describe the actual model for Value
and Decoration
.
Value
See: https://github.com/ianstormtaylor/slate/blob/master/docs/reference/slate/value.md and https://github.com/ianstormtaylor/slate/blob/master/packages/slate/src/models/value.js
The docs says the properties are:
Value({
document: Document,
selection: Selection,
data: Data,
decorations: List<Decoration>,
})
but the default properties are
const DEFAULTS = {
annotations: undefined,
data: undefined,
document: undefined,
selection: undefined,
}
Decoration
See https://github.com/ianstormtaylor/slate/blob/master/docs/reference/slate/decoration.md and https://github.com/ianstormtaylor/slate/blob/master/packages/slate/src/models/decoration.js
The docs says the properties are:
Decoration({
anchor: Point,
focus: Point,
mark: Mark,
})
but the default properties are
const DEFAULTS = {
type: undefined,
data: undefined,
anchor: undefined,
focus: undefined,
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
What is the Document Object Model? - W3C
The Document Object Model (DOM) is a programming API for HTML and XML documents. It defines the logical structure of documents and the...
Read more >Set rules for your form - Google Docs Editors Help
Set up rules for a question · Open a form in Google Forms. · Add one of the following types of questions: Short...
Read more >Introduction to the DOM - Web APIs - MDN Web Docs
The Document Object Model (DOM) is the data representation of the ... The idea is not to describe what these APIs do here...
Read more >How to Write Doc Comments for the Javadoc Tool - Oracle
Our documentation comments define the official Java Platform API Specification. ... It does not describe implementation details, such as whether the method ...
Read more >About documentation - dbt Developer Hub
Good documentation for your dbt models will help downstream ... To see documentation for all columns and not just columns described in your ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think Decoration became Annotation and that’s why it has the data and type.
I believe that this may be fixed by https://github.com/ianstormtaylor/slate/pull/3093, which has changed a lot of the logic in Slate and
slate-react
especially. I’m going to close this out, but as always, feel free to open a new issue if it persists for you. Thanks for understanding.