
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
jodit-react-ts
Advanced tools
A React wrapper for Jodit that works.
npm install jodit-react-ts jodit
import * as React from 'react';
import JoditReact from "jodit-react-ts";
import 'jodit/build/jodit.min.css';
const App = () => {
const [value, setValue] = React.useState<string>();
return (
<>
<JoditReact onChange={(content) => setValue(content)} defaultValue="Hi" />
{value}
</>
);
};
import * as React from 'react';
import 'jodit/build/jodit.min.css';
const JoditReact = React.lazy(() => {
return import('jodit-react-ts');
});
const MyEditorWrapper = () => {
const isSSR = typeof window === 'undefined';
const [value, setValue] = React.useState<string>();
return (
<div>
{!isSSR && (
<React.Suspense fallback={<div>Loading</div>}>
<JoditReact onChange={(content) => setValue(content)} defaultValue="Hi" />
</React.Suspense>
)}
</div>
);
};
import * as React from 'react';
import JoditReact from "jodit-react-ts";
import 'jodit/build/jodit.min.css';
/**
* This needs to be defined outside the scope of our wrapper otherwise will cause multiple re-renders
**/
const config = {
preset: 'inline'
};
const App = () => {
const [value, setValue] = React.useState<string>();
return (
<>
<JoditReact onChange={(content) => setValue(content)} defaultValue="Hi" config={config} />
{value}
</>
);
};
Property | Type | Required | Description |
---|---|---|---|
onChange | (content: string) => void | Yes | Callback to update a value state to keep track of the editor's content. |
config | IJodit["options"] | No | Jodit configuration object. |
defaultValue | string | no | Default content to be rendered on the editor. |
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.
FAQs
React wrapper for Jodit. Fully written in Typescript.
We found that jodit-react-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.