Quellcode durchsuchen

docs: Add rich text example to ui components doc

Michael Bromley vor 1 Jahr
Ursprung
Commit
fae8fd37c5

BIN
docs/docs/guides/extending-the-admin-ui/ui-library/form-inputs.webp


+ 6 - 1
docs/docs/guides/extending-the-admin-ui/ui-library/index.md

@@ -180,6 +180,10 @@ Form inputs are styled globally, so you don't need to use special components for
     <vdr-form-field label="Invalid with error">
         <input type="text" [formControl]="invalidFormControl" />
     </vdr-form-field>
+    <vdr-rich-text-editor
+        class="form-grid-span"
+        label="Description"
+    ></vdr-rich-text-editor>
 </div>
 ```
 
@@ -189,7 +193,7 @@ Form inputs are styled globally, so you don't need to use special components for
 ```tsx
 import React from 'react';
 import { starIcon, userIcon } from '@cds/core/icon';
-import { FormField } from '@vendure/admin-ui/react';
+import { FormField, RichTextEditor } from '@vendure/admin-ui/react';
 
 export function DemoComponent() {
     return (
@@ -215,6 +219,7 @@ export function DemoComponent() {
             <FormField label="Invalid with error" invalid>
                 <input type="text" />
             </FormField>
+            <RichTextEditor className="form-grid-span" label="Description" readOnly={false} />
         </div>
     );
 }

+ 0 - 1
packages/dev-server/example-plugins/ui-extensions-library/ui/react-components/ReactUi.tsx

@@ -76,7 +76,6 @@ export function ReactUi() {
                             <FormField label="Invalid with error" invalid={true}>
                                 <input type="text" />
                             </FormField>
-
                             <RichTextEditor className="form-grid-span" label="Description" readOnly={false} />
                         </div>
                     </Card>