1.0.12 • Published 9 months ago

@portabletext/plugin-one-line v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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>
  )
}
1.0.12

9 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.0.0

10 months ago