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

@remirror/extension-positioner

Package Overview
Dependencies
Maintainers
1
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/extension-positioner

Reposition your elements with every state update.

  • 1.0.0-next.34
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37K
increased by9.21%
Maintainers
1
Weekly downloads
 
Created
Source

@remirror/extension-positioner

Reposition your elements with every state update.

Version Weekly Downloads Bundled size Typed Codebase MIT License

Installation

# yarn
yarn add @remirror/extension-positioner@next @remirror/pm@next

# pnpm
pnpm add @remirror/extension-positioner@next @remirror/pm@next

# npm
npm install @remirror/extension-positioner@next @remirror/pm@next

Usage

An extension for tracking the position of the provided element relative to the prosemirror editor. Can be used to find the top / left position in order to position the element as a hover menu.

import { PositionerExtension } from '@remirror/extension-positioner';

const extension = new PositionerExtension();

const dispose = extension.addCustomHandler({
  positioner: 'bubble',
  element,
  onChange: ({ isActive, top, left }) => {
    // do something
  },
});

// Later in the app
dispose(); // Remove the positioner.

Keywords

FAQs

Package last updated on 10 Sep 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