From e6aa524adac1bf8b600f50a67d6b458f16b3cfaf Mon Sep 17 00:00:00 2001 From: Vitaly Rtishchev Date: Sat, 24 Sep 2022 11:27:06 +0400 Subject: [PATCH] [docs] Add id prop to rte --- docs/src/docs/others/rte.mdx | 8 +++++--- .../src/demos/rte/RichTextEditor.demo.formats.tsx | 1 + .../src/demos/rte/RichTextEditor.demo.mentions.tsx | 1 + .../src/demos/rte/RichTextEditor.demo.readOnly.tsx | 2 +- .../src/demos/rte/RichTextEditor.demo.simple.tsx | 2 +- .../src/demos/rte/RichTextEditor.demo.toolbar.tsx | 1 + 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/src/docs/others/rte.mdx b/docs/src/docs/others/rte.mdx index 1909b1ca982..beaefa6d67e 100644 --- a/docs/src/docs/others/rte.mdx +++ b/docs/src/docs/others/rte.mdx @@ -125,7 +125,9 @@ function Demo() { ); const [value, onChange] = useState(''); - return ; + return ( + + ); } ``` @@ -187,7 +189,7 @@ function Demo() { editorRef.current.focus(); }, []); - return ; + return ; } ``` @@ -242,7 +244,7 @@ Then when you want to use `RichTextEditor` import your component instead: import RichTextEditor from '../components/RichText'; function MyPage() { - return ; + return ; } ``` diff --git a/src/mantine-demos/src/demos/rte/RichTextEditor.demo.formats.tsx b/src/mantine-demos/src/demos/rte/RichTextEditor.demo.formats.tsx index 6f6bb125620..db24ad117fe 100644 --- a/src/mantine-demos/src/demos/rte/RichTextEditor.demo.formats.tsx +++ b/src/mantine-demos/src/demos/rte/RichTextEditor.demo.formats.tsx @@ -9,6 +9,7 @@ function Demo() { const [value, onChange] = useState('

Rich text editor content

'); return ( + `; function Demo(props: any) { diff --git a/src/mantine-demos/src/demos/rte/RichTextEditor.demo.simple.tsx b/src/mantine-demos/src/demos/rte/RichTextEditor.demo.simple.tsx index c55fb74598c..fd857049e0b 100644 --- a/src/mantine-demos/src/demos/rte/RichTextEditor.demo.simple.tsx +++ b/src/mantine-demos/src/demos/rte/RichTextEditor.demo.simple.tsx @@ -10,7 +10,7 @@ const initialValue = function Demo() { const [value, onChange] = useState(initialValue); - return ; + return ; } `; diff --git a/src/mantine-demos/src/demos/rte/RichTextEditor.demo.toolbar.tsx b/src/mantine-demos/src/demos/rte/RichTextEditor.demo.toolbar.tsx index d46c261ff57..6e0ac95c6d2 100644 --- a/src/mantine-demos/src/demos/rte/RichTextEditor.demo.toolbar.tsx +++ b/src/mantine-demos/src/demos/rte/RichTextEditor.demo.toolbar.tsx @@ -4,6 +4,7 @@ import { DEFAULT_CONTROLS, DEFAULT_LABELS, Toolbar } from '@mantine/rte'; const code = `