A set of helper and utility functions for Slate editors.
This repository is maintain in a monorepo see packages in packages
folder.
Shared slate type variables.
fn(change: Change, data: Object) => Change
Add additional data to block, this could be useful in implement things like align.
fn(change: Change, options: Object) => Change
This plugin is based on https://github.com/GitbookIO/slate-edit-blockquote, will wrapped block quote if the selection is not within a blockquote, otherwise unwrapped it.
fn(change: Change, dataKey: String) => Change
This remove a data key that stores in current block type
fn(change: Change, options: Object) => Change
This plugin is based on https://github.com/GitbookIO/slate-edit-list/, will wrap to block list, if it's wrapped unwrap it.
fn(change: Change, data: Object) => Change
Add additional data to inline, this could be useful in implement things like align.
fn(change: Change, type: String, options: Object) => Change
insert a link with options.href
settings, wrapped inline if the selection is expanded, and unwrap if it is a link.
fn(change: Change, options: Object) => Change
If the selected marks have type that is equal to options.type
, will be removed the original one and add a new mark with the option settings.
fn(change: Change) => Change
Remove all marks in the selection.
fn(change: Change, type: String) => Change
Remove specific mark type in the selection.
MIT © Canner