Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@draft-js-plugins/resizeable

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@draft-js-plugins/resizeable

Resizeable Plugin for DraftJS

  • 4.0.0-beta2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.4K
decreased by-39.51%
Maintainers
4
Weekly downloads
 
Created
Source

DraftJS Resizable Plugin

This is a plugin for the draft-js-plugins-editor.

Usage:

import createResizeablePlugin from '@draft-js-plugins/resizeable';

const resizePlugin = createResizeablePlugin({ isResizable: true });

This plugin does not require, but work better in combination with the draft-js-focus-plugin.


You can pass optional parameter to createResizeablePlugin;

PropsTypeDescriptionRequired
horizontal"auto" or "relative" or "absolute""relative" measures the width of image in percentages, while "absolute" measures in pixelsno
vertical"auto" or "relative" or "absolute"same as horizontal, but for heightno
initialWidthstringinitial width of image. If not passed, the default value is 40 (either % or px, depending on type of horizontal) unless horizontal is set to "auto". In case of "auto" is has no effect. You can pass any valid css value for property width. For example, "100px", "60%" or "auto"no
initialHeightstringsame as initialWidth, but for heightno

Example

import createResizeablePlugin from '@draft-js-plugins/resizeable';

const resizePlugin = createResizeablePlugin({
  horizontal: 'absolute',
  initialWidth: 'auto',
});

Keywords

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc