Socket
Socket
Sign inDemoInstall

@tiptap/extension-code

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-code

code extension for tiptap


Version published
Weekly downloads
824K
decreased by-0.21%
Maintainers
4
Weekly downloads
 
Install size
Created

Package description

What is @tiptap/extension-code?

@tiptap/extension-code is an extension for the Tiptap editor that allows you to add and manage inline code snippets within your rich text editor. It provides functionality to format text as code, making it useful for documentation, technical writing, and any other use case where inline code representation is needed.

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

Add Inline Code

This feature allows you to add inline code snippets within your text. The code sample demonstrates how to initialize the Tiptap editor with the Code extension and include inline code in the content.

import { Code } from '@tiptap/extension-code';
import { Editor } from '@tiptap/core';

const editor = new Editor({
  extensions: [
    Code,
  ],
  content: '<p>This is <code>inline code</code> in a paragraph.</p>',
});

Toggle Code Formatting

This feature allows you to toggle code formatting for the selected text. The code sample shows how to initialize the Tiptap editor with the Code extension and toggle code formatting using the chainable command API.

import { Code } from '@tiptap/extension-code';
import { Editor } from '@tiptap/core';

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

// Toggle code formatting for the selected text
editor.chain().focus().toggleCode().run();

Other packages similar to @tiptap/extension-code

Changelog

Source

2.1.13 (2023-11-30)

Bug Fixes

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

Readme

Source

@tiptap/extension-code

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