🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@portabletext/plugin-one-line

Package Overview
Dependencies
Maintainers
11
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@portabletext/plugin-one-line

🤏 Restricts the Portable Text Editor to a single line

latest
Source
npmnpm
Version
6.0.27
Version published
Weekly downloads
327K
-8.49%
Maintainers
11
Weekly downloads
 
Created
Source

One-Line Plugin

🤏 Restricts the Portable Text Editor to a single line

The plugin blocks insert.break events and provides smart handling of other insert.* events like insert.block.

Configure it with as high priority as possible to make sure other plugins don't overwrite insert.* events before this plugin gets a chance to do so.

Import the OneLinePlugin React component and place it inside the EditorProvider to automatically register the necessary Behaviors:

import {
  defineSchema,
  EditorProvider,
  PortableTextEditable,
} from '@portabletext/editor'
import {OneLinePlugin} from '@portabletext/plugin-one-line'

function App() {
  return (
    <EditorProvider initialConfig={{schemaDefinition: defineSchema({})}}>
      <PortableTextEditable />
      <OneLinePlugin />
    </EditorProvider>
  )
}

Keywords

portabletext

FAQs

Package last updated on 01 May 2026

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