Skip to content

Commit ecd1233

Browse files
committed
docs
1 parent ab06b4c commit ecd1233

File tree

98 files changed

+331
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+331
-476
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ Plate
3535

3636
You can choose one of the following templates to get started:
3737

38-
| Option | NextJS | Plate | Plugins |AI & Backend |
39-
| --------------------------------------------------------------------------------- | ------ | ----- | ------- |-------- |
40-
| [Notion clone template](https://pro.platejs.org/docs/templates/potion) || || |
41-
| [Plate playground template](https://github.com/udecode/plate-playground-template) || || |
42-
| [Plate minimal template](https://github.com/udecode/plate-template) || | | |
43-
| [NextJS template](https://platejs.org/docs/components/installation/next) || | | |
38+
| Option | NextJS | Plate | Plugins | AI & Backend |
39+
| --------------------------------------------------------------------------------- | ------ | ----- | ------- | ------------ |
40+
| [Notion-like template](https://pro.platejs.org/docs/templates/potion) |||| |
41+
| [Plate playground template](https://github.com/udecode/plate-playground-template) |||| |
42+
| [Plate minimal template](https://github.com/udecode/plate-template) ||| | |
43+
| [NextJS template](https://platejs.org/docs/components/installation/next) || | | |
4444

4545
## Documentation
4646

apps/www/content/docs/block-selection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ options: {
138138

139139
### Selection area
140140

141-
Style the selection area using `.slate-selection-area` class. For example:
141+
Style the selection area using `.slate-selection-area` class to your `EditorContainer` component. For example:
142142

143143
```js
144144
'[&_.slate-selection-area]:border [&_.slate-selection-area]:border-primary [&_.slate-selection-area]:bg-primary/10'

apps/www/content/docs/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can choose one of the following templates to get started:
1515

1616
| Option | NextJS | Plate | Plugins | AI & Backend |
1717
| --------------------------------------------------------------------------------- | ------ | ----- | ------- | ------------ |
18-
| [Notion clone template](https://pro.platejs.org/docs/templates/potion) |||||
18+
| [Notion-like template](https://pro.platejs.org/docs/templates/potion) |||||
1919
| [Plate playground template](https://github.com/udecode/plate-playground-template) |||| |
2020
| [Plate minimal template](https://github.com/udecode/plate-template) ||| | |
2121
| [NextJS template](/docs/components/installation/next) || | | |

apps/www/public/r/index.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,10 +1549,8 @@
15491549
"examples": [
15501550
"editor-default",
15511551
"editor-disabled",
1552-
"editor-ghost",
1553-
"editor-label",
1554-
"editor-text",
1555-
"editor-button"
1552+
"editor-full-width",
1553+
"editor-ai-chat"
15561554
]
15571555
},
15581556
"files": [

apps/www/public/r/styles/default/ai-demo.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/www/public/r/styles/default/align-demo.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/www/public/r/styles/default/basic-editor-handler-demo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": [
33
{
4-
"content": "'use client';\n\nimport React, { useState } from 'react';\n\nimport type { Value } from '@udecode/plate-common';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/components/ui/accordion';\nimport { editableProps } from '@/plate/demo/editableProps';\nimport { Editor } from '@/components/plate-ui/editor';\n\nconst value = [\n {\n children: [\n {\n text: 'This is editable plain text with react and history plugins, just like a textarea!',\n },\n ],\n type: 'p',\n },\n];\n\nexport default function BasicEditorHandlerDemo() {\n const [debugValue, setDebugValue] = useState<Value>(value);\n\n const localValue =\n typeof window !== 'undefined' && localStorage.getItem('editorContent');\n\n const editor = usePlateEditor({\n value: localValue ? JSON.parse(localValue) : value,\n });\n\n return (\n <Plate\n onChange={({ value }) => {\n localStorage.setItem('editorContent', JSON.stringify(value));\n setDebugValue(value);\n }}\n editor={editor}\n >\n <Editor {...editableProps} />\n\n <Accordion type=\"single\" collapsible>\n <AccordionItem value=\"manual-installation\">\n <AccordionTrigger>Debug Value</AccordionTrigger>\n <AccordionContent>{JSON.stringify(debugValue)}</AccordionContent>\n </AccordionItem>\n </Accordion>\n </Plate>\n );\n}\n",
4+
"content": "'use client';\n\nimport React, { useState } from 'react';\n\nimport type { Value } from '@udecode/plate-common';\n\nimport {\n type PlateContentProps,\n Plate,\n usePlateEditor,\n} from '@udecode/plate-common/react';\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/components/ui/accordion';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nconst editableProps: PlateContentProps = {\n autoFocus: false,\n placeholder: 'Type…',\n spellCheck: false,\n};\n\nconst value = [\n {\n children: [\n {\n text: 'This is editable plain text with react and history plugins, just like a textarea!',\n },\n ],\n type: 'p',\n },\n];\n\nexport default function BasicEditorHandlerDemo() {\n const [debugValue, setDebugValue] = useState<Value>(value);\n\n const localValue =\n typeof window !== 'undefined' && localStorage.getItem('editorContent');\n\n const editor = usePlateEditor({\n value: localValue ? JSON.parse(localValue) : value,\n });\n\n return (\n <Plate\n onChange={({ value }) => {\n localStorage.setItem('editorContent', JSON.stringify(value));\n setDebugValue(value);\n }}\n editor={editor}\n >\n <EditorContainer>\n <Editor {...editableProps} />\n </EditorContainer>\n\n <Accordion type=\"single\" collapsible>\n <AccordionItem value=\"manual-installation\">\n <AccordionTrigger>Debug Value</AccordionTrigger>\n <AccordionContent>{JSON.stringify(debugValue)}</AccordionContent>\n </AccordionItem>\n </Accordion>\n </Plate>\n );\n}\n",
55
"path": "example/basic-editor-handler-demo.tsx",
66
"target": "components/basic-editor-handler-demo.tsx",
77
"type": "registry:example"

apps/www/public/r/styles/default/basic-editor-styling-demo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": [
33
{
4-
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport { Editor } from '@/components/plate-ui/editor';\n\nexport default function BasicEditorStylingDemo() {\n const editor = usePlateEditor();\n\n return (\n <Plate editor={editor}>\n <Editor placeholder=\"Type...\" />\n </Plate>\n );\n}\n",
4+
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nexport default function BasicEditorStylingDemo() {\n const editor = usePlateEditor();\n\n return (\n <Plate editor={editor}>\n <EditorContainer>\n <Editor placeholder=\"Type...\" />\n </EditorContainer>\n </Plate>\n );\n}\n",
55
"path": "example/basic-editor-styling-demo.tsx",
66
"target": "components/basic-editor-styling-demo.tsx",
77
"type": "registry:example"

apps/www/public/r/styles/default/basic-editor-value-demo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": [
33
{
4-
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport { editableProps } from '@/plate/demo/editableProps';\nimport { Editor } from '@/components/plate-ui/editor';\n\nconst value = [\n {\n children: [\n {\n text: 'This is editable plain text with react and history plugins, just like a <textarea>!',\n },\n ],\n type: 'p',\n },\n];\n\nexport default function BasicEditorValueDemo() {\n const editor = usePlateEditor({ value });\n\n return (\n <Plate editor={editor}>\n <Editor {...editableProps} />\n </Plate>\n );\n}\n",
4+
"content": "'use client';\n\nimport React from 'react';\n\nimport {\n type PlateContentProps,\n Plate,\n usePlateEditor,\n} from '@udecode/plate-common/react';\n\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nconst editableProps: PlateContentProps = {\n autoFocus: false,\n placeholder: 'Type…',\n spellCheck: false,\n};\n\nconst value = [\n {\n children: [\n {\n text: 'This is editable plain text with react and history plugins, just like a <textarea>!',\n },\n ],\n type: 'p',\n },\n];\n\nexport default function BasicEditorValueDemo() {\n const editor = usePlateEditor({ value });\n\n return (\n <Plate editor={editor}>\n <EditorContainer>\n <Editor {...editableProps} />\n </EditorContainer>\n </Plate>\n );\n}\n",
55
"path": "example/basic-editor-value-demo.tsx",
66
"target": "components/basic-editor-value-demo.tsx",
77
"type": "registry:example"

0 commit comments

Comments
 (0)