@portabletext/editor 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/lib/_chunks-dts/behavior.types.action.d.cts +113 -128
- package/lib/_chunks-dts/behavior.types.action.d.ts +122 -137
- package/lib/index.cjs +145 -138
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +145 -138
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/behaviors/behavior.abstract.insert.ts +19 -0
- package/src/editor/editor-machine.ts +37 -44
- package/src/editor/editor-provider.tsx +4 -0
- package/src/editor/plugins/createWithObjectKeys.ts +19 -15
- package/src/editor/plugins/createWithPortableTextMarkModel.ts +60 -53
- package/src/editor/plugins/createWithSchemaTypes.ts +18 -15
- package/src/editor/plugins/createWithUndoRedo.ts +3 -1
- package/src/editor/with-normalizing-node.ts +14 -0
package/README.md
CHANGED
|
@@ -373,6 +373,50 @@ In order to provide a robust and consistent end-user experience, the editor is b
|
|
|
373
373
|
|
|
374
374
|
Now, you should be able to run `pnpm dev:test-studio` in the `sanity` repo to test Studio with a locally running Portable Text Editor.
|
|
375
375
|
|
|
376
|
+
## Available plugins
|
|
377
|
+
|
|
378
|
+
### `@portabletext/plugin-character-pair-decorator`
|
|
379
|
+
|
|
380
|
+
> ✨ Automatically match a pair of characters and decorate the text in between
|
|
381
|
+
|
|
382
|
+
- 💻 [`./packages/plugin-character-pair-decorator`](./packages/plugin-character-pair-decorator/)
|
|
383
|
+
- 📦 [@portabletext/plugin-character-pair-decorator](https://www.npmjs.com/package/@portabletext/plugin-character-pair-decorator)
|
|
384
|
+
|
|
385
|
+
### `@portabletext/plugin-input-rule`
|
|
386
|
+
|
|
387
|
+
> 🪄 Easily configure input rules in the Portable Text Editor
|
|
388
|
+
|
|
389
|
+
- 💻 [`./packages/plugin-input-rule`](./packages/plugin-input-rule/)
|
|
390
|
+
- 📦 [@portabletext/plugin-input-rule](https://www.npmjs.com/package/@portabletext/plugin-input-rule)
|
|
391
|
+
|
|
392
|
+
### `@portabletext/plugin-markdown-shortcuts`
|
|
393
|
+
|
|
394
|
+
> ⬇️ Adds helpful Markdown shortcuts to the editor
|
|
395
|
+
|
|
396
|
+
- 💻 [`./packages/plugin-markdown-shortcuts`](./packages/plugin-markdown-shortcuts/)
|
|
397
|
+
- 📦 [@portabletext/plugin-markdown-shortcuts](https://www.npmjs.com/package/@portabletext/plugin-markdown-shortcuts)
|
|
398
|
+
|
|
399
|
+
### `@portabletext/plugin-one-line`
|
|
400
|
+
|
|
401
|
+
> 🤏 Restricts the Portable Text Editor to a single line
|
|
402
|
+
|
|
403
|
+
- 💻 [`./packages/plugin-one-line`](./packages/plugin-one-line/)
|
|
404
|
+
- 📦 [@portabletext/plugin-one-line](https://www.npmjs.com/package/@portabletext/plugin-one-line)
|
|
405
|
+
|
|
406
|
+
### `@portabletext/plugin-sdk-value`
|
|
407
|
+
|
|
408
|
+
> 🔗 Connects a Portable Text Editor with a Sanity document using the SDK
|
|
409
|
+
|
|
410
|
+
- 💻 [`./packages/plugin-sdk-value`](./packages/plugin-sdk-value/)
|
|
411
|
+
- 📦 [@portabletext/plugin-sdk-value](https://www.npmjs.com/package/@portabletext/plugin-sdk-value)
|
|
412
|
+
|
|
413
|
+
### `@portabletext/plugin-typography`
|
|
414
|
+
|
|
415
|
+
> 🔁 Automatically transform text to typographic variants
|
|
416
|
+
|
|
417
|
+
- 💻 [`./packages/plugin-typography`](./packages/plugin-typography/)
|
|
418
|
+
- 📦 [@portabletext/plugin-typography](https://www.npmjs.com/package/@portabletext/plugin-typography)
|
|
419
|
+
|
|
376
420
|
## Other Libraries
|
|
377
421
|
|
|
378
422
|
This monorepo also contains additional libraries that can be used with the Portable Text Editor:
|