@atlaskit/editor-plugin-width
Version:
Width plugin for @atlaskit/editor-core
42 lines (30 loc) • 2.09 kB
Markdown
# Editor Plugin Width
Width plugin for @atlaskit/editor-core
**Note:** This component is designed for internal Atlassian development.
External contributors will be able to use this component but will not be able to submit issues.
## Overview
The Width plugin tracks and manages the editor container width and line length dimensions. It monitors resize events and provides shared state for width-related information that other editor plugins can utilize.
## Key features
- **Container width tracking** - Monitor and track the editor container's width in real-time
- **Line length tracking** - Track the content area's line length for layout calculations
- **Resize observation** - Automatically detect and respond to container size changes using ResizeObserver
- **Shared state** - Expose width and line length information through plugin shared state
- **Transition handling** - Refresh width calculations on CSS transitions
## Install
- **Install** - *yarn add @atlaskit/editor-plugin-width*
- **npm** - [@atlaskit/editor-plugin-width](https://www.npmjs.com/package/@atlaskit/editor-plugin-width)
- **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-width)
- **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-width/dist/)
## Usage
**Internal use only**
@atlaskit/editor-plugin-width is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
Direct use of this component is not supported.
Please see [Atlaskit - Editor plugin width](https://atlaskit.atlassian.com/packages/editor/editor-plugin-width) for documentation and examples for this package.
## Support
For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
## License
Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.