Adding the rich text widget

This commit is contained in:
2025-04-21 01:30:16 +02:00
parent 3fbb82642b
commit 6c480a4971
8 changed files with 1249 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ import { FormContextType, getTemplate, RJSFSchema, WidgetProps } from "@rjsf/uti
import Typography from "@mui/material/Typography";
import ForeignKeyWidget from "./foreign-key";
import Typography from "@mui/material/Typography";
import RichtextWidget from "./richtext";
export type CrudTextRJSFSchema = RJSFSchema & { props? : any };
@@ -15,6 +15,8 @@ export default function CrudTextWidget<T = any, S extends CrudTextRJSFSchema = C
return <ForeignKeyWidget {...props} />;
} else if (schema.hasOwnProperty("const")) {
return <Typography >{schema.const as string}</Typography>;
} else if (schema.props?.hasOwnProperty("richtext")) {
return <RichtextWidget {...props} />;
} else {
const { options, registry } = props;
const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);