rhino-editor
Version:
A custom element wrapped rich text editor
50 lines (49 loc) • 2.2 kB
TypeScript
import { Extension, Mark, Node } from "@tiptap/core";
import { AttachmentOptions } from "./attachment.js";
import { GalleryOptions } from "./gallery.js";
import { PlaceholderOptions } from "@tiptap/extension-placeholder";
import { FocusOptions } from "@tiptap/extension-focus";
import { StrikeOptions } from "@tiptap/extension-strike";
import { LinkOptions } from "@tiptap/extension-link";
import { PasteOptions } from "./paste.js";
import { BubbleMenuOptions } from "./bubble-menu.js";
import type { RhinoSelectionOptions } from "./selection.js";
export interface RhinoStarterKitOptions {
/** Funky hack extension for contenteditable in firefox. */
/** Enables attachment galleries */
rhinoGallery: Partial<GalleryOptions> | false;
/** Enables attachments */
rhinoAttachment: Partial<AttachmentOptions> | false;
/**
* Replaces the default strike from TipTap's StarterKit and replaces it with `<del>` instead of `<s>`
*/
rhinoStrike: Partial<StrikeOptions> | false;
/**
* A plugin for finding the currently focused element. Used by various CSS styles in the editor.
*/
rhinoFocus: Partial<FocusOptions> | false;
/**
* Enables the link dialog
*/
rhinoLink: Partial<LinkOptions> | false;
/**
* Enables & configures the placeholder you see for captions and for empty documents
*/
rhinoPlaceholder: Partial<PlaceholderOptions> | false;
/**
* Sends a browser event called `rhino-paste-event` everytime a user pastes something into the document.
*/
rhinoPasteEvent: Partial<PasteOptions> | false;
rhinoBubbleMenu: Partial<BubbleMenuOptions> | false;
/**
* A TipTap wrapper extension for https://github.com/curvenote/editor/tree/main/packages/prosemirror-codemark
*/
rhinoCodemarkPlugin: Partial<{}> | false;
/**
* A plugin that maintains selection "highlighting" even while the editor does not have focus.
* This is useful for things like entering in links.
*/
rhinoSelection: Partial<RhinoSelectionOptions> | false;
}
export type TipTapPlugin = Node | Extension | Mark;
export declare const RhinoStarterKit: Extension<RhinoStarterKitOptions, any>;