From 06c54bd9913d6bf16ab94293ade9c126dc520cac Mon Sep 17 00:00:00 2001 From: Asaf Katz Date: Sun, 21 May 2017 20:36:23 +0300 Subject: [PATCH] Docs improvements suggestions (#801) * Fix typo * Make it clearer that addMark has changed too --- docs/walkthroughs/adding-event-handlers.md | 2 +- docs/walkthroughs/applying-custom-formatting.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/walkthroughs/adding-event-handlers.md b/docs/walkthroughs/adding-event-handlers.md index d3baa1074..982c3b3d6 100644 --- a/docs/walkthroughs/adding-event-handlers.md +++ b/docs/walkthroughs/adding-event-handlers.md @@ -7,7 +7,7 @@ Okay, so you've got Slate installed and rendered on the page, and when you type in it, you can see the changes reflected. But you want to do more than just type a plaintext string. -What makes Slate great is how easy it is to customize. Just like other React components you're used it, Slate allows you to pass in handlers that are triggered on certain events. You've already seen on the `onChange` handler can be used to store the changed editor state, but let's try add something more... +What makes Slate great is how easy it is to customize. Just like other React components you're used to, Slate allows you to pass in handlers that are triggered on certain events. You've already seen on the `onChange` handler can be used to store the changed editor state, but let's try add something more... We'll show you how to use the `onKeyDown` handler to change the editor's content when the user presses a button. diff --git a/docs/walkthroughs/applying-custom-formatting.md b/docs/walkthroughs/applying-custom-formatting.md index f791fc7d5..35b7e4ad8 100644 --- a/docs/walkthroughs/applying-custom-formatting.md +++ b/docs/walkthroughs/applying-custom-formatting.md @@ -123,7 +123,9 @@ function BoldMark(props) { Pretty simple, right? -And now, let's tell Slate about that mark. To do that, we'll add it to the `schema` object under a `marks` property, like so: +And now, let's tell Slate about that mark. +To do that, we'll add it to the `schema` object under a `marks` property. +Also, let's allow our mark to be toggled by changing `addMark` to `toggleMark`. ```js function BoldMark(props) {