Socket
Socket
Sign inDemoInstall

@tiptap/extension-image

Package Overview
Dependencies
Maintainers
4
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-image

image extension for tiptap


Version published
Weekly downloads
380K
decreased by-2.33%
Maintainers
4
Weekly downloads
 
Install size
Created

Package description

What is @tiptap/extension-image?

@tiptap/extension-image is an extension for the Tiptap editor that allows users to easily add and manipulate images within their rich text content. It provides a range of functionalities to insert, resize, and align images, making it a versatile tool for enhancing text with visual content.

What are @tiptap/extension-image's main functionalities?

Insert Image

This feature allows users to insert an image into the editor. The code sample demonstrates how to initialize the editor with the Image extension and insert an image by specifying its source URL.

import { Image } from '@tiptap/extension-image';
import { Editor } from '@tiptap/core';

const editor = new Editor({
  extensions: [
    Image,
  ],
});

editor.chain().focus().setImage({ src: 'https://example.com/image.jpg' }).run();

Resize Image

This feature enables users to resize an image by setting its width and height. The code sample shows how to set the dimensions of an image within the editor.

editor.chain().focus().setNode('image', { src: 'https://example.com/image.jpg', width: 300, height: 200 }).run();

Align Image

This feature allows users to align an image within the text. The code sample demonstrates how to align an image to the right by applying a CSS style.

editor.chain().focus().setNode('image', { src: 'https://example.com/image.jpg', style: 'float: right;' }).run();

Other packages similar to @tiptap/extension-image

Changelog

Source

2.1.13 (2023-11-30)

Bug Fixes

  • react: fix performance regression because of select/deselect (#4661) (ad7f659)

Readme

Source

@tiptap/extension-image

Version Downloads License Sponsor

Introduction

Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.

Official Documentation

Documentation can be found on the Tiptap website.

License

Tiptap is open sourced software licensed under the MIT license.

Keywords

FAQs

Package last updated on 30 Nov 2023

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc