
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
mui-tiptap-editor
Advanced tools
mui-tiptap-editor: A customizable and easy to use Tiptap styled WYSIWYG rich text editor, using Material UI.
npm install mui-tiptap-editor
or
yarn add mui-tiptap-editor
import { TextEditor, TextEditorReadOnly } from 'mui-tiptap-editor';
import { useState } from "react";
function App() {
const [value, setValue] = useState<string>("");
const handleChange = (newValue: string) => setValue(newValue);
return (
<div>
<TextEditor value={value} onChange={handleChange} />
{value && <TextEditorReadOnly value={value} />}
</div>
);
}
import { TextEditor, ITextEditorOption } from 'mui-tiptap-editor';
const mentions: ITextEditorOption[] = [
{ label: "Lea Thompson", value: "id1" },
{ label: "Cyndi Lauper", value: "id2" },
{ label: "Tom Cruise", value: "id13" },
];
const currentUser: ITextEditorOption = mentions[0];
function App() {
return (
<TextEditor mentions={mentions} user={currentUser} />
);
}
See example/App.tsx
for a more thorough example of using TextEditor
.
Can display the menus as needed
import { TextEditor } from 'mui-tiptap-editor';
function App() {
return (
<TextEditor toolbar={['bold', 'italic', 'underline']} />
);
}
import './index.css';
import { TextEditor } from 'mui-tiptap-editor';
function App () {
return (
<TextEditor
value="<p>Hello word!</p>"
rootClassName="root"
/>
)
}
/* ./index.css */
.root {
background-color: #fff;
}
.root .MuiTab-root.Mui-selected {
background-color: yellow !important;
}
import './index.css';
import { TextEditor } from 'mui-tiptap-editor';
function App () {
return (
<TextEditor
value="<p>Hello word!</p>"
label="Content"
tabClassName="my-tab"
labelClassName="my-label"
inputClassName="my-input"
/>
)
}
/* ./index.css */
.my-tab.MuiTab-root.Mui-selected {
background-color: pink !important;
}
.my-label {
color: blue !important;
}
.my-input {
border: 1px solid green;
}
props | type | Default value | Description |
---|---|---|---|
toolbar | string[] | heading, bold, italic, strike, link, underline, image, code, orderedList, bulletList, align, codeBlock, blockquote, table, history, youtube, color, mention, ai | The list of the menu buttons to be displayed |
placeholder | string | empty | input placeholder |
label | string | empty | input label |
error | string | empty | Error message to display |
withFloatingMenu | boolean | false | Show or hide the floating menu |
withBubbleMenu | boolean | true | Show or hide the bubble menu |
inputClassName | string | empty | Override input styles |
toolbarClassName | string | empty | Override the toolbar menu styles |
tabsClassName | string | empty | Override the tabs (preview , editor ) styles |
tabClassName | string | empty | Override the tab (preview or editor ) styles |
errorClassName | string | empty | Override the error message styles |
rootClassName | string | empty | Override the main container styles |
labelClassName | string | empty | Override the label styles |
bubbleMenuToolbar | string[] | ['bold', 'italic', 'underline', 'link'] | Similar to toolbar props |
floatingMenuToolbar | string[] | ['bold', 'italic', 'underline', 'link'] | Similar to toolbar props |
mentions | ITextEditorOption[] | undefined | List of users to be mentionned when entering or selecting @ |
user | ITextEditorOption | undefined | Current user |
value | string | empty | Value of the input |
onChange | (value: string) => void | - | Function to call when the input change |
...all tiptap features | EditorOptions | empty | Can access to all tiptap useEditor props |
FAQs
Easy to use Tiptap WYSIWYG rich text editor using Material UI (MUI) for React
The npm package mui-tiptap-editor receives a total of 107 weekly downloads. As such, mui-tiptap-editor popularity was classified as not popular.
We found that mui-tiptap-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.