From dbf35f25651f16a1b04cbef4e842180d9aebcffa Mon Sep 17 00:00:00 2001 From: Florian <FWirtz@users.noreply.github.com> Date: Tue, 18 Sep 2018 03:26:18 +0200 Subject: [PATCH] Add info on how to use schema (#2156) --- docs/guides/schemas.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guides/schemas.md b/docs/guides/schemas.md index ac1681151..118288577 100644 --- a/docs/guides/schemas.md +++ b/docs/guides/schemas.md @@ -8,6 +8,8 @@ That said, just because Slate is agnostic doesn't mean you aren't going to need To that end, Slate provides a `Schema` model, which allows you to easily define validations for the structure of your documents, and to fix them if the document ever becomes invalid. This guide will show you how they work. +> ❗️To tell Slate about your custom schema add it to the editor as a prop [like this](https://github.com/ianstormtaylor/slate/blob/405cef0225c314b4162d587c74cfce6b65a7b257/examples/forced-layout/index.js#L62). + ## Basic Schemas Slate schemas are defined as Javascript objects, with properties that describe the document, block nodes, and inline nodes in your editor. Here's a simple schema: