🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@tiptap/extension-floating-menu

Package Overview
Dependencies
Maintainers
4
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-floating-menu - npm Package Compare versions

Comparing version

to
2.4.0

4

dist/index.js

@@ -129,2 +129,6 @@ import { posToDOMRect, Extension } from '@tiptap/core';

/**
* This extension allows you to create a floating menu.
* @see https://tiptap.dev/api/extensions/floating-menu
*/
const FloatingMenu = Extension.create({

@@ -131,0 +135,0 @@ name: 'floatingMenu',

@@ -135,2 +135,6 @@ (function (global, factory) {

/**
* This extension allows you to create a floating menu.
* @see https://tiptap.dev/api/extensions/floating-menu
*/
const FloatingMenu = core.Extension.create({

@@ -137,0 +141,0 @@ name: 'floatingMenu',

@@ -6,6 +6,28 @@ import { Editor } from '@tiptap/core';

export interface FloatingMenuPluginProps {
/**
* The plugin key for the floating menu.
* @default 'floatingMenu'
*/
pluginKey: PluginKey | string;
/**
* The editor instance.
* @default null
*/
editor: Editor;
/**
* The DOM element that contains your menu.
* @default null
*/
element: HTMLElement;
/**
* The options for the tippy instance.
* @default {}
* @see https://atomiks.github.io/tippyjs/v6/all-props/
*/
tippyOptions?: Partial<Props>;
/**
* A function that determines whether the menu should be shown or not.
* If this function returns `false`, the menu will be hidden, otherwise it will be shown.
* @default null
*/
shouldShow?: ((props: {

@@ -19,2 +41,5 @@ editor: Editor;

export declare type FloatingMenuViewProps = FloatingMenuPluginProps & {
/**
* The editor view.
*/
view: EditorView;

@@ -21,0 +46,0 @@ };

import { Extension } from '@tiptap/core';
import { FloatingMenuPluginProps } from './floating-menu-plugin.js';
export declare type FloatingMenuOptions = Omit<FloatingMenuPluginProps, 'editor' | 'element'> & {
/**
* The DOM element that contains your menu.
* @type {HTMLElement}
* @default null
*/
element: HTMLElement | null;
};
/**
* This extension allows you to create a floating menu.
* @see https://tiptap.dev/api/extensions/floating-menu
*/
export declare const FloatingMenu: Extension<FloatingMenuOptions, any>;

6

package.json
{
"name": "@tiptap/extension-floating-menu",
"description": "floating-menu extension for tiptap",
"version": "2.3.2",
"version": "2.4.0",
"homepage": "https://tiptap.dev",

@@ -32,4 +32,4 @@ "keywords": [

"devDependencies": {
"@tiptap/core": "^2.3.2",
"@tiptap/pm": "^2.3.2"
"@tiptap/core": "^2.4.0",
"@tiptap/pm": "^2.4.0"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

@@ -7,6 +7,32 @@ import { Editor, posToDOMRect } from '@tiptap/core'

export interface FloatingMenuPluginProps {
/**
* The plugin key for the floating menu.
* @default 'floatingMenu'
*/
pluginKey: PluginKey | string
/**
* The editor instance.
* @default null
*/
editor: Editor
/**
* The DOM element that contains your menu.
* @default null
*/
element: HTMLElement
/**
* The options for the tippy instance.
* @default {}
* @see https://atomiks.github.io/tippyjs/v6/all-props/
*/
tippyOptions?: Partial<Props>
/**
* A function that determines whether the menu should be shown or not.
* If this function returns `false`, the menu will be hidden, otherwise it will be shown.
* @default null
*/
shouldShow?:

@@ -23,2 +49,5 @@ | ((props: {

export type FloatingMenuViewProps = FloatingMenuPluginProps & {
/**
* The editor view.
*/
view: EditorView

@@ -25,0 +54,0 @@ }

@@ -6,5 +6,14 @@ import { Extension } from '@tiptap/core'

export type FloatingMenuOptions = Omit<FloatingMenuPluginProps, 'editor' | 'element'> & {
/**
* The DOM element that contains your menu.
* @type {HTMLElement}
* @default null
*/
element: HTMLElement | null,
}
/**
* This extension allows you to create a floating menu.
* @see https://tiptap.dev/api/extensions/floating-menu
*/
export const FloatingMenu = Extension.create<FloatingMenuOptions>({

@@ -11,0 +20,0 @@ name: 'floatingMenu',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet