
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
ra-input-rich-text
Advanced tools
<RichTextInput> component for react-admin, useful for editing HTML code in admin GUIs.
A rich text editor for React Admin, based on TipTap.
npm install ra-input-rich-text
# or
yarn add ra-input-rich-text
Use it as you would any react-admin input:
import { Edit, SimpleForm, TextInput } from 'react-admin';
import { RichTextInput } from 'ra-input-rich-text';
export const PostEdit = () => (
<Edit>
<SimpleForm>
<TextInput source="title" />
<RichTextInput source="body" />
</SimpleForm>
</Edit>
);
The <RichTextInput>
component has a toolbar
prop that accepts a ReactNode
.
You can leverage this to change the buttons size:
import { Edit, SimpleForm, TextInput } from 'react-admin';
import { RichTextInput, RichTextInputToolbar } from 'ra-input-rich-text';
export const PostEdit = () => (
<Edit>
<SimpleForm>
<TextInput source="title" />
<RichTextInput source="body" toolbar={<RichTextInputToolbar size="large" />} />
</SimpleForm>
</Edit>
);
Or to remove some prebuilt components like the <AlignmentButtons>
:
import {
RichTextInput,
RichTextInputToolbar,
LevelSelect,
FormatButtons,
ListButtons,
LinkButtons,
QuoteButtons,
ClearButtons,
} from 'ra-input-rich-text';
const MyRichTextInput = ({ size, ...props }) => (
<RichTextInput
toolbar={
<RichTextInputToolbar>
<LevelSelect size={size} />
<FormatButtons size={size} />
<ListButtons size={size} />
<LinkButtons size={size} />
<QuoteButtons size={size} />
<ClearButtons size={size} />
</RichTextInputToolbar>
}
label="Body"
source="body"
{...props}
/>
);
You might want to add more TipTap extensions. The <RichTextInput>
component accepts an editorOptions
prop, which is the object passed to the TipTap Editor.
If you just want to add extensions, don't forget to include those needed by default for our implementation. Here's an example to add the HorizontalRule node:
import {
DefaultEditorOptions,
RichTextInput,
RichTextInputToolbar,
LevelSelect,
FormatButtons,
AlignmentButtons,
ListButtons,
LinkButtons,
QuoteButtons,
ClearButtons,
} from 'ra-input-rich-text';
import HorizontalRule from '@tiptap/extension-horizontal-rule';
import Remove from '@mui/icons-material/Remove';
const MyRichTextInput = ({ size, ...props }) => (
<RichTextInput
editorOptions={MyEditorOptions}
toolbar={
<RichTextInputToolbar>
<LevelSelect size={size} />
<FormatButtons size={size} />
<AlignmentButtons {size} />
<ListButtons size={size} />
<LinkButtons size={size} />
<QuoteButtons size={size} />
<ClearButtons size={size} />
<ToggleButton
aria-label="Add an horizontal rule"
title="Add an horizontal rule"
onClick={() => editor.chain().focus().setHorizontalRule().run()}
selected={editor && editor.isActive('horizontalRule')}
>
<Remove fontSize="inherit" />
</ToggleButton>
</RichTextInputToolbar>
}
label="Body"
source="body"
{...props}
/>
);
export const MyEditorOptions = {
...DefaultEditorOptions,
extensions: [
...DefaultEditorOptions.extensions,
HorizontalRule,
],
};
This data provider is licensed under the MIT License, and sponsored by Marmelab.
5.5.4
<FilerLiveForm>
does not allow to clear filters (#10522) (djhi)create-react-admin
with ra-data-fakerest
ignore custom resources (#10502) (djhi)react-admin
package (#10505) (djhi)<DatagridAG>
and <DatagridAGClient>
access control's doc (#10521) (erwanMarmelab)title={null}
's doc on dialog components (#10520) (erwanMarmelab)@ag-grid-community/styles
(#10510) (erwanMarmelab)warnWhenUnsavedChanges
's doc on dialog forms (#10509) (erwanMarmelab)format
prop for timezone adjustment (#10506) (ogroppo)FAQs
<RichTextInput> component for react-admin, useful for editing HTML code in admin GUIs.
The npm package ra-input-rich-text receives a total of 12,114 weekly downloads. As such, ra-input-rich-text popularity was classified as popular.
We found that ra-input-rich-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.