MUI Input Label Support
Please see the code below and associated render:
const MDEditorField = (props) => {
const { formData, schema, onChange, ...propsRest } = props;
const theme = useTheme();
return (
<FormControl error={!!propsRest.rawError} fullWidth>
<InputLabel htmlFor={schema.name}>{schema.title}</InputLabel>
<Box>
<MDEditor
id={schema.name}
value={formData}
data-color-mode={theme.palette.mode}
onChange={(value) => onChange(value)}
{...propsRest}
/>
</Box>
{propsRest.error && <FormHelperText>{propsRest.error}</FormHelperText>}
</FormControl>
);
};
If someone could kindly tell me how to fix the style, and properly integrate the LabelInput that would be great - also could be worth it documenting this.
@aress31 There is a conflict in the styles.
@jaywcjlove, what would be a fix?
https://github.com/uiwjs/react-md-editor/blob/2520e88123bde4f4d31415bb362183964f94ca48/core/src/index.less#L48-L49
@aress31 We’ve added some !important CSS styles to increase specificity for compatibility with certain component libraries. Please review and submit a PR if needed.
@jaywcjlove it didn't fix the issue, MUI is one of the most used UI library - making react-md-editor compatible with it out of the box is important.
@jaywcjlove no update, example to show how to achieve this?