Skip to content

Commit

Permalink
values
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Dec 22, 2024
1 parent 81346dc commit 1b6bf02
Show file tree
Hide file tree
Showing 170 changed files with 2,364 additions and 338 deletions.
4 changes: 2 additions & 2 deletions apps/www/public/r/styles/default/ai-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"files": [
{
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/en/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"path": "example/demo.tsx",
"target": "components/demo.tsx",
"type": "registry:example"
Expand All @@ -24,7 +24,7 @@
},
{
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const aiValue: any = (\n <fragment>\n <hh2>AI Menu</hh2>\n <hp>Generate and refine content with AI.</hp>\n <hp>Access the AI menu in many ways:</hp>\n <hp indent={1} listStyleType=\"decimal\">\n <htext>Press \"⌘ + J\".</htext>\n </hp>\n <hp indent={1} listStart={2} listStyleType=\"decimal\">\n <htext>Select text and click \"Ask AI\" in the floating toolbar</htext>\n </hp>\n <hp indent={1} listStart={3} listStyleType=\"decimal\">\n <htext>Right-click a block and select \"Ask AI\"</htext>\n </hp>\n <hp indent={1} listStart={4} listStyleType=\"decimal\">\n <htext>Press space in an empty block. Try it out:</htext>\n </hp>\n <hp indent={2} listStyleType=\"disc\">\n <htext />\n </hp>\n <hp>Once opened, you can:</hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Search commands in the input field:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Use arrow keys to navigate, Enter to select</htext>\n </hp>\n <hp>\n <htext>Generating commands:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Continue writing</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Add a summary</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Explain</htext>\n </hp>\n <hp>\n <htext>Generating suggestions:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Accept</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Discard</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Try again</htext>\n </hp>\n <hp>\n <htext>Editing commands:</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Improve writing</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Make it longer or shorter</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Fix spelling & grammar</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Simplify language</htext>\n </hp>\n <hp>Editing suggestions:</hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Replace the selection</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Insert below</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Discard</htext>\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n <htext>Try again</htext>\n </hp>\n <hp>\n <htext>Note: chat history is preserved until the menu is closed.</htext>\n </hp>\n </fragment>\n);\n",
"path": "example/values/ai-value.tsx",
"path": "example/values/en/ai-value.tsx",
"target": "components/ai-value.tsx",
"type": "registry:example"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/www/public/r/styles/default/align-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
},
"files": [
{
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/en/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"path": "example/demo.tsx",
"target": "components/demo.tsx",
"type": "registry:example"
},
{
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const alignValue: any = (\n <fragment>\n <hh2 align=\"right\">Alignment</hh2>\n <hp align=\"right\">\n Align text within blocks to create visually appealing and balanced\n layouts.\n </hp>\n <hh3 align=\"center\">Center</hh3>\n <hp align=\"justify\">\n Create clean and balanced layouts by justifying block text, providing a\n professional and polished look.\n </hp>\n </fragment>\n);\n",
"path": "example/values/align-value.tsx",
"path": "example/values/en/align-value.tsx",
"target": "components/align-value.tsx",
"type": "registry:example"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/www/public/r/styles/default/autoformat-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
},
"files": [
{
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/en/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"path": "example/demo.tsx",
"target": "components/demo.tsx",
"type": "registry:example"
},
{
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const autoformatValue: any = (\n <fragment>\n <hh2>Autoformat</hh2>\n <hp>\n Empower your writing experience by enabling autoformatting features. Add\n Markdown-like shortcuts that automatically apply formatting as you type.\n </hp>\n <hp>While typing, try these mark rules:</hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>**</htext> or <htext code>__</htext> on either side of\n your text to add **bold* mark.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>*</htext> or <htext code>_</htext> on either side of your\n text to add *italic mark.\n </hp>\n\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>`</htext> on either side of your text to add `inline code\n mark.\n </hp>\n\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>~~</htext> on either side of your text to add\n ~~strikethrough~ mark.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Note that nothing happens when there is a character before, try on:*bold\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n We even support smart quotes, try typing{' '}\n <htext code>\"hello\" 'world'</htext>.\n </hp>\n\n <hp>\n At the beginning of any new block or existing block, try these (block\n rules):\n </hp>\n\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>*</htext>, <htext code>-</htext> or <htext code>+</htext>\n followed by <htext code>space</htext> to create a bulleted list.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>1.</htext> or <htext code>1)</htext> followed by{' '}\n <htext code>space</htext>\n to create a numbered list.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>[]</htext>,or <htext code>[x]</htext>\n followed by <htext code>space</htext> to create a todo list.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>&gt;</htext> followed by <htext code>space</htext> to\n create a block quote.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>```</htext> to create a code block.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>---</htext> to create a horizontal rule.\n </hp>\n\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>#</htext> followed by <htext code>space</htext> to create\n an H1 heading.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>###</htext> followed by <htext code>space</htext> to\n create an H3 sub-heading.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>####</htext> followed by <htext code>space</htext> to\n create an H4 sub-heading.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>#####</htext> followed by <htext code>space</htext> to\n create an H5 sub-heading.\n </hp>\n <hp indent={1} listStyleType=\"disc\">\n Type <htext code>######</htext> followed by <htext code>space</htext> to\n create an H6 sub-heading.\n </hp>\n </fragment>\n);\n",
"path": "example/values/autoformat-value.tsx",
"path": "example/values/en/autoformat-value.tsx",
"target": "components/autoformat-value.tsx",
"type": "registry:example"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/www/public/r/styles/default/basic-elements-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"files": [
{
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/en/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"path": "example/demo.tsx",
"target": "components/demo.tsx",
"type": "registry:example"
},
{
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const basicElementsValue: any = (\n <fragment>\n <hh2>Blocks</hh2>\n <hp>\n Easily create headings of various levels, from H1 to H6, to structure your\n content and make it more organized.\n </hp>\n <hblockquote>\n Create blockquotes to emphasize important information or highlight quotes\n from external sources.\n </hblockquote>\n <hcodeblock lang=\"javascript\">\n <hcodeline>// Use code blocks to showcase code snippets</hcodeline>\n <hcodeline>{`function greet() {`}</hcodeline>\n <hcodeline>{` console.info('Hello World!');`}</hcodeline>\n <hcodeline>{`}`}</hcodeline>\n </hcodeblock>\n </fragment>\n);\n",
"path": "example/values/basic-elements-value.tsx",
"path": "example/values/en/basic-elements-value.tsx",
"target": "components/basic-elements-value.tsx",
"type": "registry:example"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/www/public/r/styles/default/basic-marks-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"files": [
{
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"content": "'use client';\n\nimport React from 'react';\n\nimport { Plate } from '@udecode/plate-common/react';\n\nimport { editorPlugins } from '@/components/editor/plugins/editor-plugins';\nimport { useCreateEditor } from '@/components/editor/use-create-editor';\nimport { Editor, EditorContainer } from '@/components/plate-ui/editor';\n\nimport { DEMO_VALUES } from './values/en/demo-values';\n\nexport default function Demo({ id }: { id: string }) {\n const editor = useCreateEditor({\n plugins: [...editorPlugins],\n value: DEMO_VALUES[id],\n });\n\n return (\n <Plate editor={editor}>\n <EditorContainer variant=\"demo\">\n <Editor />\n </EditorContainer>\n </Plate>\n );\n}\n",
"path": "example/demo.tsx",
"target": "components/demo.tsx",
"type": "registry:example"
},
{
"content": "import { jsx } from '@udecode/plate-test-utils';\n\njsx;\n\nexport const basicMarksValue: any = (\n <fragment>\n <hh2>Marks</hh2>\n <hp>\n Add style and emphasis to your text using the mark plugins, which offers a\n variety of formatting options.\n </hp>\n <hp>\n Make text <htext bold>bold</htext>, <htext italic>italic</htext>,{' '}\n <htext underline>underlined</htext>, or apply a{' '}\n <htext bold italic underline>\n combination\n </htext>{' '}\n of these styles for a visually striking effect.\n </hp>\n <hp>\n Add <htext strikethrough>strikethrough</htext> to indicate deleted or\n outdated content.\n </hp>\n <hp>\n Write code snippets with inline <htext code>code</htext> formatting for\n easy readability.\n </hp>\n </fragment>\n);\n",
"path": "example/values/basic-marks-value.tsx",
"path": "example/values/en/basic-marks-value.tsx",
"target": "components/basic-marks-value.tsx",
"type": "registry:example"
},
Expand Down
Loading

0 comments on commit 1b6bf02

Please sign in to comment.