
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
tiptap-react-image-resize
Advanced tools
npm i tiptap-react-image-resize
yarn add tiptap-react-image-resize
it's a npm package for tiptap-react extension
resized by onMouseDown
and onMouseMove
event
export const EditorDemo = () => {
const editor = useEditor({
extensions: [
Document,
Text,
ImageSizeExtension.configure({
maxWidth: "800px",
}),
],
content: `
<img src="https://source.unsplash.com/8xznAGy4HcY/800x400" />
<img src="https://source.unsplash.com/K9QHL52rE2k/800x400" />
`,
});
return (
<div>
<EditorContent editor={editor} />
</div>
);
};
export interface ImageSizeExtensionOptions {
// image min width
minWidth: string | number;
// image max width & loader default width
maxWidth: string | number;
// border color when selected
activeBorderColor: string;
// image size level, default set to [300, 600, 900]
levels: [number, number, number] | [number, number];
// display `inline-block` or `block`, default to false
display: 'inline-block' | 'block';
allowBase64: boolean;
HTMLAttributes: Record<string, any>;
}
if it's helpful for you, please give me a star !
FAQs
react image resize extension for tiptap
The npm package tiptap-react-image-resize receives a total of 19 weekly downloads. As such, tiptap-react-image-resize popularity was classified as not popular.
We found that tiptap-react-image-resize demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.