2022-05-10 20:08:02 -04:00
|
|
|
|
import { Extension } from '@tiptap/core';
|
2022-08-22 20:09:41 -04:00
|
|
|
|
import Audio from './audio';
|
2022-05-10 20:08:02 -04:00
|
|
|
|
import Blockquote from './blockquote';
|
|
|
|
|
import Bold from './bold';
|
|
|
|
|
import BulletList from './bullet_list';
|
|
|
|
|
import Code from './code';
|
|
|
|
|
import CodeBlockHighlight from './code_block_highlight';
|
2022-06-15 14:08:44 -04:00
|
|
|
|
import FootnoteReference from './footnote_reference';
|
|
|
|
|
import FootnoteDefinition from './footnote_definition';
|
2022-08-16 08:12:38 -04:00
|
|
|
|
import Frontmatter from './frontmatter';
|
2022-05-10 20:08:02 -04:00
|
|
|
|
import Heading from './heading';
|
|
|
|
|
import HardBreak from './hard_break';
|
|
|
|
|
import HorizontalRule from './horizontal_rule';
|
2022-07-12 17:09:53 -04:00
|
|
|
|
import HTMLNodes from './html_nodes';
|
2022-05-10 20:08:02 -04:00
|
|
|
|
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';
|
2022-07-29 11:12:25 -04:00
|
|
|
|
import ReferenceDefinition from './reference_definition';
|
2022-05-25 14:08:15 -04:00
|
|
|
|
import Strike from './strike';
|
2022-06-01 20:09:20 -04:00
|
|
|
|
import TaskList from './task_list';
|
|
|
|
|
import TaskItem from './task_item';
|
2022-06-06 11:09:05 -04:00
|
|
|
|
import Table from './table';
|
|
|
|
|
import TableCell from './table_cell';
|
|
|
|
|
import TableHeader from './table_header';
|
|
|
|
|
import TableRow from './table_row';
|
2022-08-22 20:09:41 -04:00
|
|
|
|
import Video from './video';
|
2022-05-10 20:08:02 -04:00
|
|
|
|
|
|
|
|
|
export default Extension.create({
|
|
|
|
|
addGlobalAttributes() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
types: [
|
2022-08-22 20:09:41 -04:00
|
|
|
|
Audio.name,
|
2022-05-10 20:08:02 -04:00
|
|
|
|
Bold.name,
|
|
|
|
|
Blockquote.name,
|
|
|
|
|
BulletList.name,
|
|
|
|
|
Code.name,
|
|
|
|
|
CodeBlockHighlight.name,
|
2022-06-15 14:08:44 -04:00
|
|
|
|
FootnoteReference.name,
|
|
|
|
|
FootnoteDefinition.name,
|
2022-08-16 08:12:38 -04:00
|
|
|
|
Frontmatter.name,
|
2022-05-10 20:08:02 -04:00
|
|
|
|
HardBreak.name,
|
|
|
|
|
Heading.name,
|
|
|
|
|
HorizontalRule.name,
|
|
|
|
|
Image.name,
|
|
|
|
|
Italic.name,
|
|
|
|
|
Link.name,
|
|
|
|
|
ListItem.name,
|
|
|
|
|
OrderedList.name,
|
|
|
|
|
Paragraph.name,
|
2022-07-29 11:12:25 -04:00
|
|
|
|
ReferenceDefinition.name,
|
2022-05-25 14:08:15 -04:00
|
|
|
|
Strike.name,
|
2022-06-01 20:09:20 -04:00
|
|
|
|
TaskList.name,
|
|
|
|
|
TaskItem.name,
|
2022-06-06 11:09:05 -04:00
|
|
|
|
Table.name,
|
|
|
|
|
TableCell.name,
|
|
|
|
|
TableHeader.name,
|
|
|
|
|
TableRow.name,
|
2022-08-22 20:09:41 -04:00
|
|
|
|
Video.name,
|
2022-07-12 17:09:53 -04:00
|
|
|
|
...HTMLNodes.map((htmlNode) => htmlNode.name),
|
2022-05-10 20:08:02 -04:00
|
|
|
|
],
|
|
|
|
|
attributes: {
|
2022-07-12 17:09:53 -04:00
|
|
|
|
/**
|
|
|
|
|
* The reason to add a function that returns an empty
|
|
|
|
|
* string in these attributes is indicate that these
|
|
|
|
|
* attributes shouldn’t be rendered in the ProseMirror
|
|
|
|
|
* view.
|
|
|
|
|
*/
|
2022-05-10 20:08:02 -04:00
|
|
|
|
sourceMarkdown: {
|
|
|
|
|
default: null,
|
2022-07-12 17:09:53 -04:00
|
|
|
|
renderHTML: () => '',
|
2022-05-10 20:08:02 -04:00
|
|
|
|
},
|
|
|
|
|
sourceMapKey: {
|
|
|
|
|
default: null,
|
2022-07-12 17:09:53 -04:00
|
|
|
|
renderHTML: () => '',
|
2022-05-10 20:08:02 -04:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
},
|
|
|
|
|
});
|