diff --git a/docs/reference/slate/schema.md b/docs/reference/slate/schema.md index 9a0530965..dc077d8dd 100644 --- a/docs/reference/slate/schema.md +++ b/docs/reference/slate/schema.md @@ -73,6 +73,7 @@ A dictionary of inlines by type, each with its own set of validation rules. isVoid: Boolean, last: Object, nodes: Array, + marks: Array, normalize: Function, parent: Object, text: RegExp, @@ -148,6 +149,18 @@ Will validate a node's children. The `nodes` definitions can declare the `object > 🤖 The `nodes` array is order-sensitive! The example above will require that the first node be either an `image` or `video`, and that it be followed by one or more `paragraph` nodes. +### `marks` + +`Array` + +```js +{ + marks: ['italic'] +} +``` + +Will validate a node's marks. The `marks` definitions can declare a list of marks type to be allowed. If declared, any marks that are not in the list will be removed. + ### `normalize` `normalize(change: Change, violation: String, context: Object) => Void`