🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@remirror/extension-positioner

Package Overview
Dependencies
Maintainers
2
Versions
288
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.

Source
npmnpm
Version
2.0.0-beta.19
Version published
Maintainers
2
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

# pnpm
pnpm add @remirror/extension-positioner

# npm
npm install @remirror/extension-positioner

This is included by default when you install the recommended remirror package. All exports are also available via the entry-point, remirror/extensions.

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/extensions';

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

remirror

FAQs

Package last updated on 12 Sep 2022

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