UNPKG

@atlaskit/editor-plugin-placeholder

Version:

Placeholder plugin for @atlaskit/editor-core.

22 lines 853 B
import { code, text } from '@atlaskit/adf-utils/builders'; import { placeholderTextMessages as messages } from '@atlaskit/editor-common/messages'; export const createShortEmptyNodePlaceholderADF = ({ formatMessage }) => ({ version: 1, type: 'doc', content: [{ type: 'paragraph', content: [code(formatMessage(messages.shortEmptyNodePlaceholderADFSlashShortcut)), text(' '), text(formatMessage(messages.shortEmptyNodePlaceholderADFSuffix))] }] }); export const createLongEmptyNodePlaceholderADF = ({ formatMessage }) => ({ version: 1, type: 'doc', content: [{ type: 'paragraph', content: [text(formatMessage(messages.longEmptyNodePlaceholderADFPrefix)), text(' '), code(formatMessage(messages.longEmptyNodePlaceholderADFSlashShortcut)), text(' '), text(formatMessage(messages.longEmptyNodePlaceholderADFSuffix))] }] });