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/extensions/sourcemap.js')
-rw-r--r--app/assets/javascripts/content_editor/extensions/sourcemap.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/app/assets/javascripts/content_editor/extensions/sourcemap.js b/app/assets/javascripts/content_editor/extensions/sourcemap.js
new file mode 100644
index 00000000000..94236e2e70e
--- /dev/null
+++ b/app/assets/javascripts/content_editor/extensions/sourcemap.js
@@ -0,0 +1,48 @@
+import { Extension } from '@tiptap/core';
+import Blockquote from './blockquote';
+import Bold from './bold';
+import BulletList from './bullet_list';
+import Code from './code';
+import CodeBlockHighlight from './code_block_highlight';
+import Heading from './heading';
+import HardBreak from './hard_break';
+import HorizontalRule from './horizontal_rule';
+import Image from './image';
+import Italic from './italic';
+import Link from './link';
+import ListItem from './list_item';
+import OrderedList from './ordered_list';
+import Paragraph from './paragraph';
+
+export default Extension.create({
+ addGlobalAttributes() {
+ return [
+ {
+ types: [
+ Bold.name,
+ Blockquote.name,
+ BulletList.name,
+ Code.name,
+ CodeBlockHighlight.name,
+ HardBreak.name,
+ Heading.name,
+ HorizontalRule.name,
+ Image.name,
+ Italic.name,
+ Link.name,
+ ListItem.name,
+ OrderedList.name,
+ Paragraph.name,
+ ],
+ attributes: {
+ sourceMarkdown: {
+ default: null,
+ },
+ sourceMapKey: {
+ default: null,
+ },
+ },
+ },
+ ];
+ },
+});