Commit 20d6b853 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'renovate/content-editor-packages' into 'master'

Update Content Editor Packages

See merge request gitlab-org/gitlab!72867
parents 7174cbff fe10b7ed
...@@ -5,9 +5,11 @@ import { handleFileEvent } from '../services/upload_helpers'; ...@@ -5,9 +5,11 @@ import { handleFileEvent } from '../services/upload_helpers';
export default Extension.create({ export default Extension.create({
name: 'attachment', name: 'attachment',
defaultOptions: { addOptions() {
return {
uploadsPath: null, uploadsPath: null,
renderMarkdown: null, renderMarkdown: null,
};
}, },
addCommands() { addCommands() {
......
...@@ -2,8 +2,10 @@ import Playable from './playable'; ...@@ -2,8 +2,10 @@ import Playable from './playable';
export default Playable.extend({ export default Playable.extend({
name: 'audio', name: 'audio',
defaultOptions: { addOptions() {
...Playable.options, return {
...this.parent?.(),
mediaType: 'audio', mediaType: 'audio',
};
}, },
}); });
...@@ -31,13 +31,12 @@ const attrs = { ...@@ -31,13 +31,12 @@ const attrs = {
export default marks.map((name) => export default marks.map((name) =>
Mark.create({ Mark.create({
name, name,
inclusive: false, inclusive: false,
addOptions() {
defaultOptions: { return {
HTMLAttributes: {}, HTMLAttributes: {},
};
}, },
addAttributes() { addAttributes() {
return (attrs[name] || []).reduce( return (attrs[name] || []).reduce(
(acc, attr) => ({ (acc, attr) => ({
......
...@@ -7,9 +7,11 @@ const resolveImageEl = (element) => ...@@ -7,9 +7,11 @@ const resolveImageEl = (element) =>
element.nodeName === 'IMG' ? element : element.querySelector('img'); element.nodeName === 'IMG' ? element : element.querySelector('img');
export default Image.extend({ export default Image.extend({
defaultOptions: { addOptions() {
...Image.options, return {
...this.parent?.(),
inline: true, inline: true,
};
}, },
addAttributes() { addAttributes() {
return { return {
......
...@@ -3,8 +3,10 @@ import { Mark, markInputRule, mergeAttributes } from '@tiptap/core'; ...@@ -3,8 +3,10 @@ import { Mark, markInputRule, mergeAttributes } from '@tiptap/core';
export default Mark.create({ export default Mark.create({
name: 'inlineDiff', name: 'inlineDiff',
defaultOptions: { addOptions() {
return {
HTMLAttributes: {}, HTMLAttributes: {},
};
}, },
addAttributes() { addAttributes() {
......
...@@ -18,10 +18,13 @@ export const extractHrefFromMarkdownLink = (match) => { ...@@ -18,10 +18,13 @@ export const extractHrefFromMarkdownLink = (match) => {
}; };
export default Link.extend({ export default Link.extend({
defaultOptions: { addOptions() {
...Link.options, return {
...this.parent?.(),
openOnClick: false, openOnClick: false,
};
}, },
addInputRules() { addInputRules() {
const markdownLinkSyntaxInputRuleRegExp = /(?:^|\s)\[([\w|\s|-]+)\]\((?<href>.+?)\)$/gm; const markdownLinkSyntaxInputRuleRegExp = /(?:^|\s)\[([\w|\s|-]+)\]\((?<href>.+?)\)$/gm;
const urlSyntaxRegExp = /(?:^|\s)(?<href>(?:https?:\/\/|www\.)[\S]+)(?:\s|\n)$/gim; const urlSyntaxRegExp = /(?:^|\s)(?<href>(?:https?:\/\/|www\.)[\S]+)(?:\s|\n)$/gim;
......
...@@ -2,9 +2,11 @@ import { TaskItem } from '@tiptap/extension-task-item'; ...@@ -2,9 +2,11 @@ import { TaskItem } from '@tiptap/extension-task-item';
import { PARSE_HTML_PRIORITY_HIGHEST } from '../constants'; import { PARSE_HTML_PRIORITY_HIGHEST } from '../constants';
export default TaskItem.extend({ export default TaskItem.extend({
defaultOptions: { addOptions() {
return {
nested: true, nested: true,
HTMLAttributes: {}, HTMLAttributes: {},
};
}, },
addAttributes() { addAttributes() {
......
...@@ -2,9 +2,11 @@ import Playable from './playable'; ...@@ -2,9 +2,11 @@ import Playable from './playable';
export default Playable.extend({ export default Playable.extend({
name: 'video', name: 'video',
defaultOptions: { addOptions() {
...Playable.options, return {
...this.parent?.(),
mediaType: 'video', mediaType: 'video',
extraElementAttrs: { width: '400' }, extraElementAttrs: { width: '400' },
};
}, },
}); });
...@@ -7,10 +7,12 @@ export default Node.create({ ...@@ -7,10 +7,12 @@ export default Node.create({
selectable: false, selectable: false,
atom: true, atom: true,
defaultOptions: { addOptions() {
return {
HTMLAttributes: { HTMLAttributes: {
class: 'gl-display-inline-flex gl-px-1 gl-bg-blue-100 gl-rounded-base gl-font-sm', class: 'gl-display-inline-flex gl-px-1 gl-bg-blue-100 gl-rounded-base gl-font-sm',
}, },
};
}, },
parseHTML() { parseHTML() {
......
...@@ -63,36 +63,36 @@ ...@@ -63,36 +63,36 @@
"@rails/ujs": "6.1.4-1", "@rails/ujs": "6.1.4-1",
"@sentry/browser": "5.30.0", "@sentry/browser": "5.30.0",
"@sourcegraph/code-host-integration": "0.0.60", "@sourcegraph/code-host-integration": "0.0.60",
"@tiptap/core": "^2.0.0-beta.125", "@tiptap/core": "^2.0.0-beta.138",
"@tiptap/extension-blockquote": "^2.0.0-beta.19", "@tiptap/extension-blockquote": "^2.0.0-beta.24",
"@tiptap/extension-bold": "^2.0.0-beta.19", "@tiptap/extension-bold": "^2.0.0-beta.24",
"@tiptap/extension-bullet-list": "^2.0.0-beta.18", "@tiptap/extension-bullet-list": "^2.0.0-beta.23",
"@tiptap/extension-code": "^2.0.0-beta.20", "@tiptap/extension-code": "^2.0.0-beta.25",
"@tiptap/extension-code-block-lowlight": "2.0.0-beta.47", "@tiptap/extension-code-block-lowlight": "2.0.0-beta.55",
"@tiptap/extension-document": "^2.0.0-beta.13", "@tiptap/extension-document": "^2.0.0-beta.15",
"@tiptap/extension-dropcursor": "^2.0.0-beta.19", "@tiptap/extension-dropcursor": "^2.0.0-beta.24",
"@tiptap/extension-gapcursor": "^2.0.0-beta.27", "@tiptap/extension-gapcursor": "^2.0.0-beta.33",
"@tiptap/extension-hard-break": "^2.0.0-beta.24", "@tiptap/extension-hard-break": "^2.0.0-beta.30",
"@tiptap/extension-heading": "^2.0.0-beta.18", "@tiptap/extension-heading": "^2.0.0-beta.23",
"@tiptap/extension-history": "^2.0.0-beta.16", "@tiptap/extension-history": "^2.0.0-beta.21",
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.24", "@tiptap/extension-horizontal-rule": "^2.0.0-beta.30",
"@tiptap/extension-image": "^2.0.0-beta.19", "@tiptap/extension-image": "^2.0.0-beta.24",
"@tiptap/extension-italic": "^2.0.0-beta.19", "@tiptap/extension-italic": "^2.0.0-beta.24",
"@tiptap/extension-link": "^2.0.0-beta.23", "@tiptap/extension-link": "^2.0.0-beta.28",
"@tiptap/extension-list-item": "^2.0.0-beta.14", "@tiptap/extension-list-item": "^2.0.0-beta.19",
"@tiptap/extension-ordered-list": "^2.0.0-beta.19", "@tiptap/extension-ordered-list": "^2.0.0-beta.24",
"@tiptap/extension-paragraph": "^2.0.0-beta.17", "@tiptap/extension-paragraph": "^2.0.0-beta.22",
"@tiptap/extension-strike": "^2.0.0-beta.21", "@tiptap/extension-strike": "^2.0.0-beta.26",
"@tiptap/extension-subscript": "^2.0.0-beta.4", "@tiptap/extension-subscript": "^2.0.0-beta.9",
"@tiptap/extension-superscript": "^2.0.0-beta.4", "@tiptap/extension-superscript": "^2.0.0-beta.9",
"@tiptap/extension-table": "^2.0.0-beta.34", "@tiptap/extension-table": "^2.0.0-beta.42",
"@tiptap/extension-table-cell": "^2.0.0-beta.15", "@tiptap/extension-table-cell": "^2.0.0-beta.20",
"@tiptap/extension-table-header": "^2.0.0-beta.17", "@tiptap/extension-table-header": "^2.0.0-beta.22",
"@tiptap/extension-table-row": "^2.0.0-beta.14", "@tiptap/extension-table-row": "^2.0.0-beta.19",
"@tiptap/extension-task-item": "^2.0.0-beta.21", "@tiptap/extension-task-item": "^2.0.0-beta.28",
"@tiptap/extension-task-list": "^2.0.0-beta.18", "@tiptap/extension-task-list": "^2.0.0-beta.23",
"@tiptap/extension-text": "^2.0.0-beta.13", "@tiptap/extension-text": "^2.0.0-beta.15",
"@tiptap/vue-2": "^2.0.0-beta.60", "@tiptap/vue-2": "^2.0.0-beta.68",
"@toast-ui/editor": "^2.5.2", "@toast-ui/editor": "^2.5.2",
"@toast-ui/vue-editor": "^2.5.2", "@toast-ui/vue-editor": "^2.5.2",
"apollo-cache-inmemory": "^1.6.6", "apollo-cache-inmemory": "^1.6.6",
...@@ -162,10 +162,10 @@ ...@@ -162,10 +162,10 @@
"portal-vue": "^2.1.7", "portal-vue": "^2.1.7",
"prismjs": "^1.21.0", "prismjs": "^1.21.0",
"prosemirror-markdown": "^1.6.0", "prosemirror-markdown": "^1.6.0",
"prosemirror-model": "^1.14.3", "prosemirror-model": "^1.15.0",
"prosemirror-state": "^1.3.4", "prosemirror-state": "^1.3.4",
"prosemirror-tables": "^1.1.1", "prosemirror-tables": "^1.1.1",
"prosemirror-view": "^1.20.3", "prosemirror-view": "^1.23.1",
"raphael": "^2.2.7", "raphael": "^2.2.7",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"scrollparent": "^2.0.1", "scrollparent": "^2.0.1",
......
...@@ -28,7 +28,6 @@ import TableHeader from '~/content_editor/extensions/table_header'; ...@@ -28,7 +28,6 @@ import TableHeader from '~/content_editor/extensions/table_header';
import TableRow from '~/content_editor/extensions/table_row'; import TableRow from '~/content_editor/extensions/table_row';
import TaskItem from '~/content_editor/extensions/task_item'; import TaskItem from '~/content_editor/extensions/task_item';
import TaskList from '~/content_editor/extensions/task_list'; import TaskList from '~/content_editor/extensions/task_list';
import Text from '~/content_editor/extensions/text';
import markdownSerializer from '~/content_editor/services/markdown_serializer'; import markdownSerializer from '~/content_editor/services/markdown_serializer';
import { createTestEditor, createDocBuilder } from '../test_utils'; import { createTestEditor, createDocBuilder } from '../test_utils';
...@@ -58,7 +57,6 @@ const tiptapEditor = createTestEditor({ ...@@ -58,7 +57,6 @@ const tiptapEditor = createTestEditor({
Link, Link,
ListItem, ListItem,
OrderedList, OrderedList,
Paragraph,
Strike, Strike,
Table, Table,
TableCell, TableCell,
...@@ -66,7 +64,6 @@ const tiptapEditor = createTestEditor({ ...@@ -66,7 +64,6 @@ const tiptapEditor = createTestEditor({
TableRow, TableRow,
TaskItem, TaskItem,
TaskList, TaskList,
Text,
], ],
}); });
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment