UNPKG

@atlaskit/editor-plugin-placeholder

Version:

Placeholder plugin for @atlaskit/editor-core.

31 lines (30 loc) • 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createShortEmptyNodePlaceholderADF = exports.createLongEmptyNodePlaceholderADF = void 0; var _code = require("@atlaskit/adf-utils/code"); var _text = require("@atlaskit/adf-utils/text"); var _placeholderText = require("@atlaskit/editor-common/messages/placeholder-text"); var createShortEmptyNodePlaceholderADF = exports.createShortEmptyNodePlaceholderADF = function createShortEmptyNodePlaceholderADF(_ref) { var formatMessage = _ref.formatMessage; return { version: 1, type: 'doc', content: [{ type: 'paragraph', content: [(0, _code.code)(formatMessage(_placeholderText.placeholderTextMessages.shortEmptyNodePlaceholderADFSlashShortcut)), (0, _text.text)(' '), (0, _text.text)(formatMessage(_placeholderText.placeholderTextMessages.shortEmptyNodePlaceholderADFSuffix))] }] }; }; var createLongEmptyNodePlaceholderADF = exports.createLongEmptyNodePlaceholderADF = function createLongEmptyNodePlaceholderADF(_ref2) { var formatMessage = _ref2.formatMessage; return { version: 1, type: 'doc', content: [{ type: 'paragraph', content: [(0, _text.text)(formatMessage(_placeholderText.placeholderTextMessages.longEmptyNodePlaceholderADFPrefix)), (0, _text.text)(' '), (0, _code.code)(formatMessage(_placeholderText.placeholderTextMessages.longEmptyNodePlaceholderADFSlashShortcut)), (0, _text.text)(' '), (0, _text.text)(formatMessage(_placeholderText.placeholderTextMessages.longEmptyNodePlaceholderADFSuffix))] }] }; };