Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/content_editor/constants.js')
-rw-r--r--app/assets/javascripts/content_editor/constants.js34
1 files changed, 33 insertions, 1 deletions
diff --git a/app/assets/javascripts/content_editor/constants.js b/app/assets/javascripts/content_editor/constants.js
index 45ebd87dac9..7a5f1d3ed1f 100644
--- a/app/assets/javascripts/content_editor/constants.js
+++ b/app/assets/javascripts/content_editor/constants.js
@@ -1,4 +1,4 @@
-import { s__ } from '~/locale';
+import { s__, __ } from '~/locale';
export const PROVIDE_SERIALIZER_OR_RENDERER_ERROR = s__(
'ContentEditor|You have to provide a renderMarkdown function or a custom serializer',
@@ -8,3 +8,35 @@ export const CONTENT_EDITOR_TRACKING_LABEL = 'content_editor';
export const TOOLBAR_CONTROL_TRACKING_ACTION = 'execute_toolbar_control';
export const KEYBOARD_SHORTCUT_TRACKING_ACTION = 'execute_keyboard_shortcut';
export const INPUT_RULE_TRACKING_ACTION = 'execute_input_rule';
+
+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'),
+ },
+];