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/footnotes_section.js')
-rw-r--r--app/assets/javascripts/content_editor/extensions/footnotes_section.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/content_editor/extensions/footnotes_section.js b/app/assets/javascripts/content_editor/extensions/footnotes_section.js
new file mode 100644
index 00000000000..914a8934734
--- /dev/null
+++ b/app/assets/javascripts/content_editor/extensions/footnotes_section.js
@@ -0,0 +1,19 @@
+import { mergeAttributes, Node } from '@tiptap/core';
+
+export default Node.create({
+ name: 'footnotesSection',
+
+ content: 'footnoteDefinition+',
+
+ group: 'block',
+
+ isolating: true,
+
+ parseHTML() {
+ return [{ tag: 'section.footnotes > ol' }];
+ },
+
+ renderHTML({ HTMLAttributes }) {
+ return ['ol', mergeAttributes(HTMLAttributes, { class: 'footnotes gl-font-sm' }), 0];
+ },
+});