@draft-js-plugins/resizeable
Advanced tools
Comparing version 4.0.0-beta2 to 4.0.0
@@ -8,2 +8,4 @@ # Change Log | ||
## 4.0.0 | ||
- Hide internals in single bundle | ||
@@ -10,0 +12,0 @@ - Add esm support |
{ | ||
"name": "@draft-js-plugins/resizeable", | ||
"version": "4.0.0-beta2", | ||
"version": "4.0.0", | ||
"description": "Resizeable Plugin for DraftJS", | ||
@@ -5,0 +5,0 @@ "author": { |
# DraftJS Resizable Plugin | ||
_This is a plugin for the `draft-js-plugins-editor`._ | ||
_This is a plugin for the `@draft-js-plugins/editor`._ | ||
Usage: | ||
```js | ||
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`; | ||
| Props | Type | Description | Required | | ||
| ------------- | :--------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| horizontal | "auto" or "relative" or "absolute" | "relative" measures the width of image in percentages, while "absolute" measures in pixels | no | | ||
| vertical | "auto" or "relative" or "absolute" | same as horizontal, but for height | no | | ||
| initialWidth | string | initial 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 | | ||
| initialHeight | string | same as initialWidth, but for height | no | | ||
### Example | ||
```js | ||
import createResizeablePlugin from '@draft-js-plugins/resizeable'; | ||
const resizePlugin = createResizeablePlugin({ | ||
horizontal: 'absolute', | ||
initialWidth: 'auto', | ||
}); | ||
``` | ||
see https://www.draft-js-plugins.com/plugin/resizeable |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
32378
8