Adding the rich text widget
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user