UNPKG

@atlaskit/editor-plugin-custom-autoformat

Version:

Custom autoformat plugin for @atlaskit/editor-core

6 lines 300 B
import { PluginKey } from '@atlaskit/editor-prosemirror/state'; export const pluginKey = new PluginKey('customAutoformatPlugin'); export const getPluginState = editorState => pluginKey.getState(editorState); export const autoformatAction = (tr, action) => { return tr.setMeta(pluginKey, action); };