Skip to content

KID-1912/tiptap-extension-float

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiptap-extension-float

An extension to add float to your tiptap content.


NPM URL version



Install

npm install tiptap-extension-float -S

Usage

import Float from "tiptap-extension-float";

const editor = new Editor({
  element: document.querySelector(".editor"),
  extensions: [StarterKit, Image.configure({ inline: true }), Float],
});

editor.chain().focus().updateAttributes("image", { float: "left" }).run();
// default: cancel float style
editor.chain().focus().updateAttributes("image", { float: "default" }).run();

Options

You can configure extension options, which are optional.

  extensions: [
    StarterKit,
    Image.configure({ inline: true }),
    Float.configure({
      types: ["image"], // Allow float node types
    }),
  ],

Relations

tiptap/extension-text-align: https://github.com/ueberdosis/tiptap/tree/main/packages/extension-text-align

tiptap-appmsg-editor: https://github.com/KID-1912/tiptap-appmsg-editor

About

An extension to add float to your tiptap content.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published