2021-09-04 01:27:46 +05:30
|
|
|
import { s__, __ } from '~/locale';
|
2021-04-29 21:17:54 +05:30
|
|
|
|
|
|
|
export const PROVIDE_SERIALIZER_OR_RENDERER_ERROR = s__(
|
|
|
|
'ContentEditor|You have to provide a renderMarkdown function or a custom serializer',
|
|
|
|
);
|
2021-06-08 01:23:25 +05:30
|
|
|
|
|
|
|
export const CONTENT_EDITOR_TRACKING_LABEL = 'content_editor';
|
|
|
|
export const TOOLBAR_CONTROL_TRACKING_ACTION = 'execute_toolbar_control';
|
2021-10-27 15:23:28 +05:30
|
|
|
export const BUBBLE_MENU_TRACKING_ACTION = 'execute_bubble_menu_control';
|
2021-06-08 01:23:25 +05:30
|
|
|
export const KEYBOARD_SHORTCUT_TRACKING_ACTION = 'execute_keyboard_shortcut';
|
|
|
|
export const INPUT_RULE_TRACKING_ACTION = 'execute_input_rule';
|
2021-09-04 01:27:46 +05:30
|
|
|
|
|
|
|
export const TEXT_STYLE_DROPDOWN_ITEMS = [
|
|
|
|
{
|
|
|
|
contentType: 'heading',
|
|
|
|
commandParams: { level: 1 },
|
|
|
|
editorCommand: 'setHeading',
|
|
|
|
label: __('Heading 1'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
contentType: 'heading',
|
|
|
|
editorCommand: 'setHeading',
|
|
|
|
commandParams: { level: 2 },
|
|
|
|
label: __('Heading 2'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
contentType: 'heading',
|
|
|
|
editorCommand: 'setHeading',
|
|
|
|
commandParams: { level: 3 },
|
|
|
|
label: __('Heading 3'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
contentType: 'heading',
|
|
|
|
editorCommand: 'setHeading',
|
|
|
|
commandParams: { level: 4 },
|
|
|
|
label: __('Heading 4'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
contentType: 'paragraph',
|
|
|
|
editorCommand: 'setParagraph',
|
|
|
|
label: __('Normal text'),
|
|
|
|
},
|
|
|
|
];
|
2021-10-27 15:23:28 +05:30
|
|
|
|
|
|
|
export const LOADING_CONTENT_EVENT = 'loadingContent';
|
|
|
|
export const LOADING_SUCCESS_EVENT = 'loadingSuccess';
|
|
|
|
export const LOADING_ERROR_EVENT = 'loadingError';
|
2021-11-11 11:23:49 +05:30
|
|
|
|
|
|
|
export const PARSE_HTML_PRIORITY_LOWEST = 1;
|
|
|
|
export const PARSE_HTML_PRIORITY_DEFAULT = 50;
|
|
|
|
export const PARSE_HTML_PRIORITY_HIGHEST = 100;
|
2022-03-02 08:16:31 +05:30
|
|
|
|
|
|
|
export const EXTENSION_PRIORITY_LOWER = 75;
|
|
|
|
/**
|
|
|
|
* 100 is the default priority in Tiptap
|
|
|
|
* https://tiptap.dev/guide/custom-extensions/#priority
|
|
|
|
*/
|
|
|
|
export const EXTENSION_PRIORITY_DEFAULT = 100;
|