Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
eee97b89
Commit
eee97b89
authored
Oct 22, 2021
by
GitLab Renovate
Committed by
Jacques Erasmus
Oct 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Content Editor Packages
parent
52715b71
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
498 additions
and
387 deletions
+498
-387
app/assets/javascripts/content_editor/extensions/blockquote.js
...ssets/javascripts/content_editor/extensions/blockquote.js
+8
-4
app/assets/javascripts/content_editor/extensions/description_list.js
...javascripts/content_editor/extensions/description_list.js
+4
-5
app/assets/javascripts/content_editor/extensions/details.js
app/assets/javascripts/content_editor/extensions/details.js
+4
-5
app/assets/javascripts/content_editor/extensions/emoji.js
app/assets/javascripts/content_editor/extensions/emoji.js
+19
-17
app/assets/javascripts/content_editor/extensions/horizontal_rule.js
.../javascripts/content_editor/extensions/horizontal_rule.js
+3
-3
app/assets/javascripts/content_editor/extensions/html_marks.js
...ssets/javascripts/content_editor/extensions/html_marks.js
+7
-1
app/assets/javascripts/content_editor/extensions/inline_diff.js
...sets/javascripts/content_editor/extensions/inline_diff.js
+13
-5
app/assets/javascripts/content_editor/extensions/link.js
app/assets/javascripts/content_editor/extensions/link.js
+13
-5
app/assets/javascripts/content_editor/extensions/math_inline.js
...sets/javascripts/content_editor/extensions/math_inline.js
+3
-3
app/assets/javascripts/content_editor/extensions/subscript.js
...assets/javascripts/content_editor/extensions/subscript.js
+7
-1
app/assets/javascripts/content_editor/extensions/superscript.js
...sets/javascripts/content_editor/extensions/superscript.js
+7
-1
app/assets/javascripts/content_editor/extensions/table_of_contents.js
...avascripts/content_editor/extensions/table_of_contents.js
+11
-10
app/assets/javascripts/content_editor/extensions/word_break.js
...ssets/javascripts/content_editor/extensions/word_break.js
+3
-3
app/assets/javascripts/content_editor/services/track_input_rules_and_shortcuts.js
...ontent_editor/services/track_input_rules_and_shortcuts.js
+13
-10
package.json
package.json
+21
-22
spec/frontend/content_editor/extensions/attachment_spec.js
spec/frontend/content_editor/extensions/attachment_spec.js
+4
-4
spec/frontend/content_editor/extensions/blockquote_spec.js
spec/frontend/content_editor/extensions/blockquote_spec.js
+32
-14
spec/frontend/content_editor/extensions/emoji_spec.js
spec/frontend/content_editor/extensions/emoji_spec.js
+4
-6
spec/frontend/content_editor/extensions/horizontal_rule_spec.js
...rontend/content_editor/extensions/horizontal_rule_spec.js
+34
-15
spec/frontend/content_editor/extensions/inline_diff_spec.js
spec/frontend/content_editor/extensions/inline_diff_spec.js
+38
-22
spec/frontend/content_editor/extensions/link_spec.js
spec/frontend/content_editor/extensions/link_spec.js
+38
-53
spec/frontend/content_editor/extensions/math_inline_spec.js
spec/frontend/content_editor/extensions/math_inline_spec.js
+2
-9
spec/frontend/content_editor/extensions/table_of_contents_spec.js
...ntend/content_editor/extensions/table_of_contents_spec.js
+16
-16
spec/frontend/content_editor/extensions/word_break_spec.js
spec/frontend/content_editor/extensions/word_break_spec.js
+35
-0
spec/frontend/content_editor/services/track_input_rules_and_shortcuts_spec.js
...t_editor/services/track_input_rules_and_shortcuts_spec.js
+2
-9
spec/frontend/content_editor/test_utils.js
spec/frontend/content_editor/test_utils.js
+23
-0
yarn.lock
yarn.lock
+134
-144
No files found.
app/assets/javascripts/content_editor/extensions/blockquote.js
View file @
eee97b89
import
{
Blockquote
}
from
'
@tiptap/extension-blockquote
'
;
import
{
wrappingInputRule
}
from
'
prosemirror-inputrules
'
;
import
{
wrappingInputRule
}
from
'
@tiptap/core
'
;
import
{
getParents
}
from
'
~/lib/utils/dom_utils
'
;
import
{
getMarkdownSource
}
from
'
../services/markdown_sourcemap
'
;
export
const
multilineInputRegex
=
/^
\s
*>>>
\s
$/gm
;
export
default
Blockquote
.
extend
({
addAttributes
()
{
return
{
...
...
@@ -25,9 +23,15 @@ export default Blockquote.extend({
},
addInputRules
()
{
const
multilineInputRegex
=
/^
\s
*>>>
\s
$/gm
;
return
[
...
this
.
parent
?.(),
wrappingInputRule
(
multilineInputRegex
,
this
.
type
,
()
=>
({
multiline
:
true
})),
wrappingInputRule
({
find
:
multilineInputRegex
,
type
:
this
.
type
,
getAttributes
:
()
=>
({
multiline
:
true
}),
}),
];
},
});
app/assets/javascripts/content_editor/extensions/description_list.js
View file @
eee97b89
import
{
Node
,
mergeAttributes
}
from
'
@tiptap/core
'
;
import
{
wrappingInputRule
}
from
'
prosemirror-inputrules
'
;
export
const
inputRegex
=
/^
\s
*
(
<dl>
)
$/
;
import
{
Node
,
mergeAttributes
,
wrappingInputRule
}
from
'
@tiptap/core
'
;
export
default
Node
.
create
({
name
:
'
descriptionList
'
,
...
...
@@ -18,6 +15,8 @@ export default Node.create({
},
addInputRules
()
{
return
[
wrappingInputRule
(
inputRegex
,
this
.
type
)];
const
inputRegex
=
/^
\s
*
(
<dl>
)
$/
;
return
[
wrappingInputRule
({
find
:
inputRegex
,
type
:
this
.
type
})];
},
});
app/assets/javascripts/content_editor/extensions/details.js
View file @
eee97b89
import
{
Node
}
from
'
@tiptap/core
'
;
import
{
Node
,
wrappingInputRule
}
from
'
@tiptap/core
'
;
import
{
VueNodeViewRenderer
}
from
'
@tiptap/vue-2
'
;
import
{
wrappingInputRule
}
from
'
prosemirror-inputrules
'
;
import
DetailsWrapper
from
'
../components/wrappers/details.vue
'
;
export
const
inputRegex
=
/^
\s
*
(
<details>
)
$/
;
export
default
Node
.
create
({
name
:
'
details
'
,
content
:
'
detailsContent+
'
,
...
...
@@ -24,7 +21,9 @@ export default Node.create({
},
addInputRules
()
{
return
[
wrappingInputRule
(
inputRegex
,
this
.
type
)];
const
inputRegex
=
/^
\s
*
(
<details>
)
$/
;
return
[
wrappingInputRule
({
find
:
inputRegex
,
type
:
this
.
type
})];
},
addCommands
()
{
...
...
app/assets/javascripts/content_editor/extensions/emoji.js
View file @
eee97b89
import
{
Node
}
from
'
@tiptap/core
'
;
import
{
InputRule
}
from
'
prosemirror-inputrules
'
;
import
{
Node
,
InputRule
}
from
'
@tiptap/core
'
;
import
{
initEmojiMap
,
getAllEmoji
}
from
'
~/emoji
'
;
export
const
emojiInputRegex
=
/
(?:
^|
\s)((?:
:
)((?:\w
+
))(?:
:
))
$/
;
export
default
Node
.
create
({
name
:
'
emoji
'
,
...
...
@@ -54,15 +51,19 @@ export default Node.create({
},
addInputRules
()
{
const
emojiInputRegex
=
/
(?:
^|
\s)(
:
(\w
+
)
:
)
$/
;
return
[
new
InputRule
(
emojiInputRegex
,
(
state
,
match
,
start
,
end
)
=>
{
new
InputRule
({
find
:
emojiInputRegex
,
handler
:
({
state
,
range
:
{
from
,
to
},
match
})
=>
{
const
[,
,
name
]
=
match
;
const
emojis
=
getAllEmoji
();
const
emoji
=
emojis
[
name
];
const
{
tr
}
=
state
;
if
(
emoji
)
{
tr
.
replaceWith
(
start
,
end
,
[
tr
.
replaceWith
(
from
,
to
,
[
state
.
schema
.
text
(
'
'
),
this
.
type
.
create
({
name
,
moji
:
emoji
.
e
,
unicodeVersion
:
emoji
.
u
,
title
:
emoji
.
d
}),
]);
...
...
@@ -71,6 +72,7 @@ export default Node.create({
}
return
null
;
},
}),
];
},
...
...
app/assets/javascripts/content_editor/extensions/horizontal_rule.js
View file @
eee97b89
import
{
nodeInputRule
}
from
'
@tiptap/core
'
;
import
{
HorizontalRule
}
from
'
@tiptap/extension-horizontal-rule
'
;
export
const
hrInputRuleRegExp
=
/^---$/
;
export
default
HorizontalRule
.
extend
({
addInputRules
()
{
return
[
nodeInputRule
(
hrInputRuleRegExp
,
this
.
type
)];
const
hrInputRuleRegExp
=
/^---$/
;
return
[
nodeInputRule
({
find
:
hrInputRuleRegExp
,
type
:
this
.
type
})];
},
});
app/assets/javascripts/content_editor/extensions/html_marks.js
View file @
eee97b89
...
...
@@ -60,7 +60,13 @@ export default marks.map((name) =>
},
addInputRules
()
{
return
[
markInputRule
(
markInputRegex
(
name
),
this
.
type
,
extractMarkAttributesFromMatch
)];
return
[
markInputRule
({
find
:
markInputRegex
(
name
),
type
:
this
.
type
,
getAttributes
:
extractMarkAttributesFromMatch
,
}),
];
},
}),
);
app/assets/javascripts/content_editor/extensions/inline_diff.js
View file @
eee97b89
import
{
Mark
,
markInputRule
,
mergeAttributes
}
from
'
@tiptap/core
'
;
export
const
inputRegexAddition
=
/
(\{\+(
.+
?)\+\})
$/gm
;
export
const
inputRegexDeletion
=
/
(\{
-
(
.+
?)
-
\})
$/gm
;
export
default
Mark
.
create
({
name
:
'
inlineDiff
'
,
...
...
@@ -38,9 +35,20 @@ export default Mark.create({
},
addInputRules
()
{
const
inputRegexAddition
=
/
(\{\+(
.+
?)\+\})
$/gm
;
const
inputRegexDeletion
=
/
(\{
-
(
.+
?)
-
\})
$/gm
;
return
[
markInputRule
(
inputRegexAddition
,
this
.
type
,
()
=>
({
type
:
'
addition
'
})),
markInputRule
(
inputRegexDeletion
,
this
.
type
,
()
=>
({
type
:
'
deletion
'
})),
markInputRule
({
find
:
inputRegexAddition
,
type
:
this
.
type
,
getAttributes
:
()
=>
({
type
:
'
addition
'
}),
}),
markInputRule
({
find
:
inputRegexDeletion
,
type
:
this
.
type
,
getAttributes
:
()
=>
({
type
:
'
deletion
'
}),
}),
];
},
});
app/assets/javascripts/content_editor/extensions/link.js
View file @
eee97b89
import
{
markInputRule
}
from
'
@tiptap/core
'
;
import
{
Link
}
from
'
@tiptap/extension-link
'
;
export
const
markdownLinkSyntaxInputRuleRegExp
=
/
(?:
^|
\s)\[([\w
|
\s
|-
]
+
)\]\((?<
href>.+
?)\)
$/gm
;
export
const
urlSyntaxRegExp
=
/
(?:
^|
\s)(?<
href>
(?:
https
?
:
\/\/
|www
\.)[\S]
+
)(?:\s
|
\n)
$/gim
;
const
extractHrefFromMatch
=
(
match
)
=>
{
return
{
href
:
match
.
groups
.
href
};
};
...
...
@@ -26,9 +23,20 @@ export default Link.extend({
openOnClick
:
false
,
},
addInputRules
()
{
const
markdownLinkSyntaxInputRuleRegExp
=
/
(?:
^|
\s)\[([\w
|
\s
|-
]
+
)\]\((?<
href>.+
?)\)
$/gm
;
const
urlSyntaxRegExp
=
/
(?:
^|
\s)(?<
href>
(?:
https
?
:
\/\/
|www
\.)[\S]
+
)(?:\s
|
\n)
$/gim
;
return
[
markInputRule
(
markdownLinkSyntaxInputRuleRegExp
,
this
.
type
,
extractHrefFromMarkdownLink
),
markInputRule
(
urlSyntaxRegExp
,
this
.
type
,
extractHrefFromMatch
),
markInputRule
({
find
:
markdownLinkSyntaxInputRuleRegExp
,
type
:
this
.
type
,
getAttributes
:
extractHrefFromMarkdownLink
,
}),
markInputRule
({
find
:
urlSyntaxRegExp
,
type
:
this
.
type
,
getAttributes
:
extractHrefFromMatch
,
}),
];
},
addAttributes
()
{
...
...
app/assets/javascripts/content_editor/extensions/math_inline.js
View file @
eee97b89
...
...
@@ -2,8 +2,6 @@ import { Mark, markInputRule } from '@tiptap/core';
import
{
__
}
from
'
~/locale
'
;
import
{
PARSE_HTML_PRIORITY_HIGHEST
}
from
'
../constants
'
;
export
const
inputRegex
=
/
(?:
^|
\s)\$
`
([^
`
]
+
)
`
\$
$/gm
;
export
default
Mark
.
create
({
name
:
'
mathInline
'
,
...
...
@@ -30,6 +28,8 @@ export default Mark.create({
},
addInputRules
()
{
return
[
markInputRule
(
inputRegex
,
this
.
type
)];
const
inputRegex
=
/
(?:
^|
\s)\$
`
([^
`
]
+
)
`
\$
$/gm
;
return
[
markInputRule
({
find
:
inputRegex
,
type
:
this
.
type
})];
},
});
app/assets/javascripts/content_editor/extensions/subscript.js
View file @
eee97b89
...
...
@@ -4,6 +4,12 @@ import { markInputRegex, extractMarkAttributesFromMatch } from '../services/mark
export
default
Subscript
.
extend
({
addInputRules
()
{
return
[
markInputRule
(
markInputRegex
(
'
sub
'
),
this
.
type
,
extractMarkAttributesFromMatch
)];
return
[
markInputRule
({
find
:
markInputRegex
(
'
sub
'
),
type
:
this
.
type
,
getAttributes
:
extractMarkAttributesFromMatch
,
}),
];
},
});
app/assets/javascripts/content_editor/extensions/superscript.js
View file @
eee97b89
...
...
@@ -4,6 +4,12 @@ import { markInputRegex, extractMarkAttributesFromMatch } from '../services/mark
export
default
Superscript
.
extend
({
addInputRules
()
{
return
[
markInputRule
(
markInputRegex
(
'
sup
'
),
this
.
type
,
extractMarkAttributesFromMatch
)];
return
[
markInputRule
({
find
:
markInputRegex
(
'
sup
'
),
type
:
this
.
type
,
getAttributes
:
extractMarkAttributesFromMatch
,
}),
];
},
});
app/assets/javascripts/content_editor/extensions/table_of_contents.js
View file @
eee97b89
import
{
Node
}
from
'
@tiptap/core
'
;
import
{
InputRule
}
from
'
prosemirror-inputrules
'
;
import
{
Node
,
InputRule
}
from
'
@tiptap/core
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
PARSE_HTML_PRIORITY_HIGHEST
}
from
'
../constants
'
;
export
const
inputRuleRegExps
=
[
/^
\[\[
_TOC_
\]\]
$/
,
/^
\[
TOC
\]
$/
];
export
default
Node
.
create
({
name
:
'
tableOfContents
'
,
...
...
@@ -34,17 +31,21 @@ export default Node.create({
addInputRules
()
{
const
{
type
}
=
this
;
const
inputRuleRegExps
=
[
/^
\[\[
_TOC_
\]\]
$/
,
/^
\[
TOC
\]
$/
];
return
inputRuleRegExps
.
map
(
(
regex
)
=>
new
InputRule
(
regex
,
(
state
,
match
,
start
,
end
)
=>
{
new
InputRule
({
find
:
regex
,
handler
:
({
state
,
range
:
{
from
,
to
},
match
})
=>
{
const
{
tr
}
=
state
;
if
(
match
)
{
tr
.
replaceWith
(
start
-
1
,
end
,
type
.
create
());
tr
.
replaceWith
(
from
-
1
,
to
,
type
.
create
());
}
return
tr
;
},
}),
);
},
...
...
app/assets/javascripts/content_editor/extensions/word_break.js
View file @
eee97b89
import
{
Node
,
mergeAttributes
,
nodeInputRule
}
from
'
@tiptap/core
'
;
export
const
inputRegex
=
/^<wbr>$/
;
export
default
Node
.
create
({
name
:
'
wordBreak
'
,
inline
:
true
,
...
...
@@ -24,6 +22,8 @@ export default Node.create({
},
addInputRules
()
{
return
[
nodeInputRule
(
inputRegex
,
this
.
type
)];
const
inputRegex
=
/^<wbr>$/
;
return
[
nodeInputRule
({
find
:
inputRegex
,
type
:
this
.
type
})];
},
});
app/assets/javascripts/content_editor/services/track_input_rules_and_shortcuts.js
View file @
eee97b89
import
{
mapValues
}
from
'
lodash
'
;
import
{
InputRule
}
from
'
prosemirror-inputrules
'
;
import
{
InputRule
}
from
'
@tiptap/core
'
;
import
{
ENTER_KEY
,
BACKSPACE_KEY
}
from
'
~/lib/utils/keys
'
;
import
Tracking
from
'
~/tracking
'
;
import
{
...
...
@@ -17,10 +17,12 @@ const trackKeyboardShortcut = (contentType, commandFn, shortcut) => () => {
};
const
trackInputRule
=
(
contentType
,
inputRule
)
=>
{
return
new
InputRule
(
inputRule
.
match
,
(...
args
)
=>
{
return
new
InputRule
({
find
:
inputRule
.
find
,
handler
:
(...
args
)
=>
{
const
result
=
inputRule
.
handler
(...
args
);
if
(
result
)
{
if
(
result
!==
null
)
{
Tracking
.
event
(
undefined
,
INPUT_RULE_TRACKING_ACTION
,
{
label
:
CONTENT_EDITOR_TRACKING_LABEL
,
property
:
contentType
,
...
...
@@ -28,6 +30,7 @@ const trackInputRule = (contentType, inputRule) => {
}
return
result
;
},
});
};
...
...
package.json
View file @
eee97b89
...
...
@@ -63,36 +63,36 @@
"
@rails/ujs
"
:
"
6.1.4-1
"
,
"
@sentry/browser
"
:
"
5.30.0
"
,
"
@sourcegraph/code-host-integration
"
:
"
0.0.60
"
,
"
@tiptap/core
"
:
"
^2.0.0-beta.1
18
"
,
"
@tiptap/extension-blockquote
"
:
"
^2.0.0-beta.1
5
"
,
"
@tiptap/extension-bold
"
:
"
^2.0.0-beta.1
5
"
,
"
@tiptap/extension-bullet-list
"
:
"
^2.0.0-beta.1
5
"
,
"
@tiptap/extension-code
"
:
"
^2.0.0-beta.
16
"
,
"
@tiptap/extension-code-block-lowlight
"
:
"
2.0.0-beta.4
1
"
,
"
@tiptap/core
"
:
"
^2.0.0-beta.1
25
"
,
"
@tiptap/extension-blockquote
"
:
"
^2.0.0-beta.1
9
"
,
"
@tiptap/extension-bold
"
:
"
^2.0.0-beta.1
9
"
,
"
@tiptap/extension-bullet-list
"
:
"
^2.0.0-beta.1
8
"
,
"
@tiptap/extension-code
"
:
"
^2.0.0-beta.
20
"
,
"
@tiptap/extension-code-block-lowlight
"
:
"
2.0.0-beta.4
7
"
,
"
@tiptap/extension-document
"
:
"
^2.0.0-beta.13
"
,
"
@tiptap/extension-dropcursor
"
:
"
^2.0.0-beta.19
"
,
"
@tiptap/extension-gapcursor
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-hard-break
"
:
"
^2.0.0-beta.2
1
"
,
"
@tiptap/extension-heading
"
:
"
^2.0.0-beta.1
5
"
,
"
@tiptap/extension-gapcursor
"
:
"
^2.0.0-beta.2
7
"
,
"
@tiptap/extension-hard-break
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-heading
"
:
"
^2.0.0-beta.1
8
"
,
"
@tiptap/extension-history
"
:
"
^2.0.0-beta.16
"
,
"
@tiptap/extension-horizontal-rule
"
:
"
^2.0.0-beta.2
1
"
,
"
@tiptap/extension-image
"
:
"
^2.0.0-beta.1
5
"
,
"
@tiptap/extension-italic
"
:
"
^2.0.0-beta.1
5
"
,
"
@tiptap/extension-link
"
:
"
^2.0.0-beta.2
0
"
,
"
@tiptap/extension-horizontal-rule
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-image
"
:
"
^2.0.0-beta.1
9
"
,
"
@tiptap/extension-italic
"
:
"
^2.0.0-beta.1
9
"
,
"
@tiptap/extension-link
"
:
"
^2.0.0-beta.2
3
"
,
"
@tiptap/extension-list-item
"
:
"
^2.0.0-beta.14
"
,
"
@tiptap/extension-ordered-list
"
:
"
^2.0.0-beta.1
6
"
,
"
@tiptap/extension-ordered-list
"
:
"
^2.0.0-beta.1
9
"
,
"
@tiptap/extension-paragraph
"
:
"
^2.0.0-beta.17
"
,
"
@tiptap/extension-strike
"
:
"
^2.0.0-beta.
17
"
,
"
@tiptap/extension-strike
"
:
"
^2.0.0-beta.
21
"
,
"
@tiptap/extension-subscript
"
:
"
^2.0.0-beta.4
"
,
"
@tiptap/extension-superscript
"
:
"
^2.0.0-beta.4
"
,
"
@tiptap/extension-table
"
:
"
^2.0.0-beta.3
1
"
,
"
@tiptap/extension-table
"
:
"
^2.0.0-beta.3
4
"
,
"
@tiptap/extension-table-cell
"
:
"
^2.0.0-beta.15
"
,
"
@tiptap/extension-table-header
"
:
"
^2.0.0-beta.17
"
,
"
@tiptap/extension-table-row
"
:
"
^2.0.0-beta.14
"
,
"
@tiptap/extension-task-item
"
:
"
^2.0.0-beta.
18
"
,
"
@tiptap/extension-task-list
"
:
"
^2.0.0-beta.1
7
"
,
"
@tiptap/extension-task-item
"
:
"
^2.0.0-beta.
21
"
,
"
@tiptap/extension-task-list
"
:
"
^2.0.0-beta.1
8
"
,
"
@tiptap/extension-text
"
:
"
^2.0.0-beta.13
"
,
"
@tiptap/vue-2
"
:
"
^2.0.0-beta.
57
"
,
"
@tiptap/vue-2
"
:
"
^2.0.0-beta.
60
"
,
"
@toast-ui/editor
"
:
"
^2.5.2
"
,
"
@toast-ui/vue-editor
"
:
"
^2.5.2
"
,
"
apollo-cache-inmemory
"
:
"
^1.6.6
"
,
...
...
@@ -159,12 +159,11 @@
"
popper.js
"
:
"
^1.16.1
"
,
"
portal-vue
"
:
"
^2.1.7
"
,
"
prismjs
"
:
"
^1.21.0
"
,
"
prosemirror-inputrules
"
:
"
^1.1.3
"
,
"
prosemirror-markdown
"
:
"
^1.6.0
"
,
"
prosemirror-model
"
:
"
^1.14.3
"
,
"
prosemirror-state
"
:
"
^1.3.4
"
,
"
prosemirror-tables
"
:
"
^1.1.1
"
,
"
prosemirror-view
"
:
"
^1.20.
2
"
,
"
prosemirror-view
"
:
"
^1.20.
3
"
,
"
raphael
"
:
"
^2.2.7
"
,
"
raw-loader
"
:
"
^4.0.2
"
,
"
scrollparent
"
:
"
^2.0.1
"
,
...
...
@@ -246,7 +245,7 @@
"
prettier
"
:
"
2.2.1
"
,
"
prosemirror-schema-basic
"
:
"
^1.1.2
"
,
"
prosemirror-schema-list
"
:
"
^1.1.6
"
,
"
prosemirror-test-builder
"
:
"
^1.0.
4
"
,
"
prosemirror-test-builder
"
:
"
^1.0.
5
"
,
"
purgecss
"
:
"
^4.0.3
"
,
"
purgecss-from-html
"
:
"
^4.0.3
"
,
"
readdir-enhanced
"
:
"
^2.2.4
"
,
...
...
spec/frontend/content_editor/extensions/attachment_spec.js
View file @
eee97b89
...
...
@@ -75,9 +75,9 @@ describe('content_editor/extensions/attachment', () => {
it
.
each
`
eventType | propName | eventData | output
${
'
paste
'
}
|
${
'
handlePaste
'
}
|
${{
clipboardData
:
{
files
:
[
attachmentFile
]
}
}} |
${
true
}
${
'
paste
'
}
|
${
'
handlePaste
'
}
|
${{
clipboardData
:
{
files
:
[]
}
}} |
${
undefined
}
${
'
drop
'
}
|
${
'
handleDrop
'
}
|
${{
dataTransfer
:
{
files
:
[
attachmentFile
]
}
}} |
${
true
}
${
'
paste
'
}
|
${
'
handlePaste
'
}
|
${{
clipboardData
:
{
getData
:
jest
.
fn
(),
files
:
[
attachmentFile
]
}
}} |
${
true
}
${
'
paste
'
}
|
${
'
handlePaste
'
}
|
${{
clipboardData
:
{
getData
:
jest
.
fn
(),
files
:
[]
}
}} |
${
undefined
}
${
'
drop
'
}
|
${
'
handleDrop
'
}
|
${{
dataTransfer
:
{
getData
:
jest
.
fn
(),
files
:
[
attachmentFile
]
}
}} |
${
true
}
`
(
'
handles $eventType properly
'
,
({
eventType
,
propName
,
eventData
,
output
})
=>
{
const
event
=
Object
.
assign
(
new
Event
(
eventType
),
eventData
);
const
handled
=
tiptapEditor
.
view
.
someProp
(
propName
,
(
eventHandler
)
=>
{
...
...
spec/frontend/content_editor/extensions/blockquote_spec.js
View file @
eee97b89
import
{
multilineInputRegex
}
from
'
~/content_editor/extensions/blockquote
'
;
import
Blockquote
from
'
~/content_editor/extensions/blockquote
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerNodeInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/blockquote
'
,
()
=>
{
describe
.
each
`
input | matches
${
'
>>>
'
}
|
${
true
}
${
'
>>>
'
}
|
${
true
}
${
'
\t
>>>
'
}
|
${
true
}
${
'
>>
'
}
|
${
false
}
${
'
>>>x
'
}
|
${
false
}
${
'
>
'
}
|
${
false
}
`
(
'
multilineInputRegex
'
,
({
input
,
matches
})
=>
{
it
(
`
${
matches
?
'
matches
'
:
'
does not match
'
}
: "
${
input
}
"`
,
()
=>
{
const
match
=
new
RegExp
(
multilineInputRegex
).
test
(
input
);
let
tiptapEditor
;
let
doc
;
let
p
;
let
blockquote
;
expect
(
match
).
toBe
(
matches
);
beforeEach
(()
=>
{
tiptapEditor
=
createTestEditor
({
extensions
:
[
Blockquote
]
});
({
builders
:
{
doc
,
p
,
blockquote
},
}
=
createDocBuilder
({
tiptapEditor
,
names
:
{
blockquote
:
{
nodeType
:
Blockquote
.
name
},
},
}));
});
it
.
each
`
input | insertedNode
${
'
>>>
'
}
|
${()
=>
blockquote
({
multiline
:
true
},
p
())}
${
'
>
'
}
|
${()
=>
blockquote
(
p
())}
${
'
>>>
'
}
|
${()
=>
blockquote
({
multiline
:
true
},
p
())}
${
'
>>
'
}
|
${()
=>
p
()}
${
'
>>>x
'
}
|
${()
=>
p
()}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
const
expectedDoc
=
doc
(
insertedNode
());
triggerNodeInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
});
spec/frontend/content_editor/extensions/emoji_spec.js
View file @
eee97b89
import
{
initEmojiMock
}
from
'
helpers/emoji
'
;
import
Emoji
from
'
~/content_editor/extensions/emoji
'
;
import
{
createTestEditor
,
createDocBuilder
}
from
'
../test_utils
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerNodeInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/emoji
'
,
()
=>
{
let
tiptapEditor
;
...
...
@@ -28,18 +28,16 @@ describe('content_editor/extensions/emoji', () => {
describe
(
'
when typing a valid emoji input rule
'
,
()
=>
{
it
(
'
inserts an emoji node
'
,
()
=>
{
const
{
view
}
=
tiptapEditor
;
const
{
selection
}
=
view
.
state
;
const
expectedDoc
=
doc
(
p
(
'
'
,
emoji
({
moji
:
'
❤
'
,
name
:
'
heart
'
,
title
:
'
heavy black heart
'
,
unicodeVersion
:
'
1.1
'
}),
),
);
// Triggers the event handler that input rules listen to
view
.
someProp
(
'
handleTextInput
'
,
(
f
)
=>
f
(
view
,
selection
.
from
,
selection
.
to
,
'
:heart:
'
));
expect
(
eq
(
tiptapEditor
.
state
.
doc
,
expectedDoc
)).
toBe
(
true
);
triggerNodeInputRule
({
tiptapEditor
,
inputRuleText
:
'
:heart:
'
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
});
...
...
spec/frontend/content_editor/extensions/horizontal_rule_spec.js
View file @
eee97b89
import
{
hrInputRuleRegExp
}
from
'
~/content_editor/extensions/horizontal_rule
'
;
import
HorizontalRule
from
'
~/content_editor/extensions/horizontal_rule
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerNodeInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/horizontal_rule
'
,
()
=>
{
describe
.
each
`
input | matches
${
'
---
'
}
|
${
true
}
${
'
--
'
}
|
${
false
}
${
'
---x
'
}
|
${
false
}
${
'
---x
'
}
|
${
false
}
${
'
---
'
}
|
${
false
}
${
'
x---x
'
}
|
${
false
}
${
'
x---
'
}
|
${
false
}
`
(
'
hrInputRuleRegExp
'
,
({
input
,
matches
})
=>
{
it
(
`
${
matches
?
'
matches
'
:
'
does not match
'
}
: "
${
input
}
"`
,
()
=>
{
const
match
=
new
RegExp
(
hrInputRuleRegExp
).
test
(
input
);
let
tiptapEditor
;
let
doc
;
let
p
;
let
horizontalRule
;
expect
(
match
).
toBe
(
matches
);
beforeEach
(()
=>
{
tiptapEditor
=
createTestEditor
({
extensions
:
[
HorizontalRule
]
});
({
builders
:
{
doc
,
p
,
horizontalRule
},
}
=
createDocBuilder
({
tiptapEditor
,
names
:
{
horizontalRule
:
{
nodeType
:
HorizontalRule
.
name
},
},
}));
});
it
.
each
`
input | insertedNodes
${
'
---
'
}
|
${()
=>
[
p
(),
horizontalRule
()]}
${
'
--
'
}
|
${()
=>
[
p
()]}
${
'
---x
'
}
|
${()
=>
[
p
()]}
${
'
---x
'
}
|
${()
=>
[
p
()]}
${
'
---
'
}
|
${()
=>
[
p
()]}
${
'
x---x
'
}
|
${()
=>
[
p
()]}
${
'
x---
'
}
|
${()
=>
[
p
()]}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNodes
})
=>
{
const
expectedDoc
=
doc
(...
insertedNodes
());
triggerNodeInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
});
spec/frontend/content_editor/extensions/inline_diff_spec.js
View file @
eee97b89
import
{
inputRegexAddition
,
inputRegexDeletion
}
from
'
~/content_editor/extensions/inline_diff
'
;
import
InlineDiff
from
'
~/content_editor/extensions/inline_diff
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerMarkInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/inline_diff
'
,
()
=>
{
describe
.
each
`
inputRegex | description | input | matches
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
hello{+world+}
'
}
|
${
true
}
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
hello{+ world +}
'
}
|
${
true
}
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
hello {+ world+}
'
}
|
${
true
}
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
{+hello world +}
'
}
|
${
true
}
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
{+hello with
\n
newline+}
'
}
|
${
false
}
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
{+open only
'
}
|
${
false
}
${
inputRegexAddition
}
|
${
'
inputRegexAddition
'
}
|
${
'
close only+}
'
}
|
${
false
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
hello{-world-}
'
}
|
${
true
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
hello{- world -}
'
}
|
${
true
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
hello {- world-}
'
}
|
${
true
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
{-hello world -}
'
}
|
${
true
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
{+hello with
\n
newline+}
'
}
|
${
false
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
{-open only
'
}
|
${
false
}
${
inputRegexDeletion
}
|
${
'
inputRegexDeletion
'
}
|
${
'
close only-}
'
}
|
${
false
}
`
(
'
$description
'
,
({
inputRegex
,
input
,
matches
})
=>
{
it
(
`
${
matches
?
'
matches
'
:
'
does not match
'
}
: "
${
input
}
"`
,
()
=>
{
const
match
=
new
RegExp
(
inputRegex
).
test
(
input
);
let
tiptapEditor
;
let
doc
;
let
p
;
let
inlineDiff
;
expect
(
match
).
toBe
(
matches
);
beforeEach
(()
=>
{
tiptapEditor
=
createTestEditor
({
extensions
:
[
InlineDiff
]
});
({
builders
:
{
doc
,
p
,
inlineDiff
},
}
=
createDocBuilder
({
tiptapEditor
,
names
:
{
inlineDiff
:
{
markType
:
InlineDiff
.
name
},
},
}));
});
it
.
each
`
input | insertedNode
${
'
hello{+world+}
'
}
|
${()
=>
p
(
'
hello
'
,
inlineDiff
(
'
world
'
))}
${
'
hello{+ world +}
'
}
|
${()
=>
p
(
'
hello
'
,
inlineDiff
(
'
world
'
))}
${
'
{+hello with
\n
newline+}
'
}
|
${()
=>
p
(
'
{+hello with newline+}
'
)}
${
'
{+open only
'
}
|
${()
=>
p
(
'
{+open only
'
)}
${
'
close only+}
'
}
|
${()
=>
p
(
'
close only+}
'
)}
${
'
hello{-world-}
'
}
|
${()
=>
p
(
'
hello
'
,
inlineDiff
({
type
:
'
deletion
'
},
'
world
'
))}
${
'
hello{- world -}
'
}
|
${()
=>
p
(
'
hello
'
,
inlineDiff
({
type
:
'
deletion
'
},
'
world
'
))}
${
'
hello {- world-}
'
}
|
${()
=>
p
(
'
hello
'
,
inlineDiff
({
type
:
'
deletion
'
},
'
world
'
))}
${
'
{-hello world -}
'
}
|
${()
=>
p
(
inlineDiff
({
type
:
'
deletion
'
},
'
hello world
'
))}
${
'
{-hello with
\n
newline-}
'
}
|
${()
=>
p
(
'
{-hello with newline-}
'
)}
${
'
{-open only
'
}
|
${()
=>
p
(
'
{-open only
'
)}
${
'
close only-}
'
}
|
${()
=>
p
(
'
close only-}
'
)}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
const
expectedDoc
=
doc
(
insertedNode
());
triggerMarkInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
});
spec/frontend/content_editor/extensions/link_spec.js
View file @
eee97b89
import
{
markdownLinkSyntaxInputRuleRegExp
,
urlSyntaxRegExp
,
extractHrefFromMarkdownLink
,
}
from
'
~/content_editor/extensions/link
'
;
import
Link
from
'
~/content_editor/extensions/link
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerMarkInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/link
'
,
()
=>
{
describe
.
each
`
input | matches
${
'
[gitlab](https://gitlab.com)
'
}
|
${
true
}
${
'
[documentation](readme.md)
'
}
|
${
true
}
${
'
[link 123](readme.md)
'
}
|
${
true
}
${
'
[link 123](read me.md)
'
}
|
${
true
}
${
'
text
'
}
|
${
false
}
${
'
documentation](readme.md
'
}
|
${
false
}
${
'
https://www.google.com
'
}
|
${
false
}
`
(
'
markdownLinkSyntaxInputRuleRegExp
'
,
({
input
,
matches
})
=>
{
it
(
`
${
matches
?
'
matches
'
:
'
does not match
'
}
${
input
}
`
,
()
=>
{
const
match
=
new
RegExp
(
markdownLinkSyntaxInputRuleRegExp
).
exec
(
input
);
expect
(
Boolean
(
match
?.
groups
.
href
)).
toBe
(
matches
);
});
});
describe
.
each
`
input | matches
${
'
http://example.com
'
}
|
${
true
}
${
'
https://example.com
'
}
|
${
true
}
${
'
www.example.com
'
}
|
${
true
}
${
'
example.com/ab.html
'
}
|
${
false
}
${
'
text
'
}
|
${
false
}
${
'
http://example.com
'
}
|
${
true
}
${
'
https://www.google.com
'
}
|
${
true
}
`
(
'
urlSyntaxRegExp
'
,
({
input
,
matches
})
=>
{
it
(
`
${
matches
?
'
matches
'
:
'
does not match
'
}
${
input
}
`
,
()
=>
{
const
match
=
new
RegExp
(
urlSyntaxRegExp
).
exec
(
input
);
expect
(
Boolean
(
match
?.
groups
.
href
)).
toBe
(
matches
);
});
});
describe
(
'
extractHrefFromMarkdownLink
'
,
()
=>
{
const
input
=
'
[gitlab](https://gitlab.com)
'
;
const
href
=
'
https://gitlab.com
'
;
let
match
;
let
result
;
let
tiptapEditor
;
let
doc
;
let
p
;
let
link
;
beforeEach
(()
=>
{
match
=
new
RegExp
(
markdownLinkSyntaxInputRuleRegExp
).
exec
(
input
);
result
=
extractHrefFromMarkdownLink
(
match
);
});
it
(
'
extracts the url from a markdown link captured by markdownLinkSyntaxInputRuleRegExp
'
,
()
=>
{
expect
(
result
).
toEqual
({
href
});
});
it
(
'
makes sure that url text is the last capture group
'
,
()
=>
{
expect
(
match
[
match
.
length
-
1
]).
toEqual
(
'
gitlab
'
);
});
tiptapEditor
=
createTestEditor
({
extensions
:
[
Link
]
});
({
builders
:
{
doc
,
p
,
link
},
}
=
createDocBuilder
({
tiptapEditor
,
names
:
{
link
:
{
markType
:
Link
.
name
},
},
}));
});
afterEach
(()
=>
{
tiptapEditor
.
destroy
();
});
it
.
each
`
input | insertedNode
${
'
[gitlab](https://gitlab.com)
'
}
|
${()
=>
p
(
link
({
href
:
'
https://gitlab.com
'
},
'
gitlab
'
))}
${
'
[documentation](readme.md)
'
}
|
${()
=>
p
(
link
({
href
:
'
readme.md
'
},
'
documentation
'
))}
${
'
[link 123](readme.md)
'
}
|
${()
=>
p
(
link
({
href
:
'
readme.md
'
},
'
link 123
'
))}
${
'
[link 123](read me.md)
'
}
|
${()
=>
p
(
link
({
href
:
'
read me.md
'
},
'
link 123
'
))}
${
'
text
'
}
|
${()
=>
p
(
'
text
'
)}
${
'
documentation](readme.md
'
}
|
${()
=>
p
(
'
documentation](readme.md
'
)}
${
'
http://example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
http://example.com
'
},
'
http://example.com
'
))}
${
'
https://example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
https://example.com
'
},
'
https://example.com
'
))}
${
'
www.example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
www.example.com
'
},
'
www.example.com
'
))}
${
'
example.com/ab.html
'
}
|
${()
=>
p
(
'
example.com/ab.html
'
)}
${
'
https://www.google.com
'
}
|
${()
=>
p
(
link
({
href
:
'
https://www.google.com
'
},
'
https://www.google.com
'
))}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
const
expectedDoc
=
doc
(
insertedNode
());
triggerMarkInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
});
spec/frontend/content_editor/extensions/math_inline_spec.js
View file @
eee97b89
import
MathInline
from
'
~/content_editor/extensions/math_inline
'
;
import
{
createTestEditor
,
createDocBuilder
}
from
'
../test_utils
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerMarkInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/math_inline
'
,
()
=>
{
let
tiptapEditor
;
...
...
@@ -26,16 +26,9 @@ describe('content_editor/extensions/math_inline', () => {
${
'
$`a^2`
'
}
|
${()
=>
p
(
'
$`a^2`
'
)}
${
'
`a^2`$
'
}
|
${()
=>
p
(
'
`a^2`$
'
)}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
const
{
view
}
=
tiptapEditor
;
const
expectedDoc
=
doc
(
insertedNode
());
tiptapEditor
.
chain
().
setContent
(
input
).
setTextSelection
(
0
).
run
();
const
{
state
}
=
tiptapEditor
;
const
{
selection
}
=
state
;
// Triggers the event handler that input rules listen to
view
.
someProp
(
'
handleTextInput
'
,
(
f
)
=>
f
(
view
,
selection
.
from
,
input
.
length
+
1
,
input
));
triggerMarkInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
...
...
spec/frontend/content_editor/extensions/table_of_contents_spec.js
View file @
eee97b89
import
TableOfContents
from
'
~/content_editor/extensions/table_of_contents
'
;
import
{
createTestEditor
,
createDocBuilder
}
from
'
../test_utils
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerNodeInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/
emoji
'
,
()
=>
{
describe
(
'
content_editor/extensions/
table_of_contents
'
,
()
=>
{
let
tiptapEditor
;
let
builders
;
let
doc
;
let
tableOfContents
;
let
p
;
beforeEach
(()
=>
{
tiptapEditor
=
createTestEditor
({
extensions
:
[
TableOfContents
]
});
({
builders
}
=
createDocBuilder
({
({
builders
:
{
doc
,
p
,
tableOfContents
},
}
=
createDocBuilder
({
tiptapEditor
,
names
:
{
tableOfContents
:
{
nodeType
:
TableOfContents
.
name
}
},
}));
...
...
@@ -15,20 +19,16 @@ describe('content_editor/extensions/emoji', () => {
it
.
each
`
input | insertedNode
${
'
[[_TOC_]]
'
}
|
${
'
tableOfContents
'
}
${
'
[TOC]
'
}
|
${
'
tableOfContents
'
}
${
'
[toc]
'
}
|
${
'
p
'
}
${
'
TOC
'
}
|
${
'
p
'
}
${
'
[_TOC_]
'
}
|
${
'
p
'
}
${
'
[[TOC]]
'
}
|
${
'
p
'
}
${
'
[[_TOC_]]
'
}
|
${
()
=>
tableOfContents
()
}
${
'
[TOC]
'
}
|
${
()
=>
tableOfContents
()
}
${
'
[toc]
'
}
|
${
()
=>
p
()
}
${
'
TOC
'
}
|
${
()
=>
p
()
}
${
'
[_TOC_]
'
}
|
${
()
=>
p
()
}
${
'
[[TOC]]
'
}
|
${
()
=>
p
()
}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
const
{
doc
}
=
builders
;
const
{
view
}
=
tiptapEditor
;
const
{
selection
}
=
view
.
state
;
const
expectedDoc
=
doc
(
builders
[
insertedNode
]());
const
expectedDoc
=
doc
(
insertedNode
());
// Triggers the event handler that input rules listen to
view
.
someProp
(
'
handleTextInput
'
,
(
f
)
=>
f
(
view
,
selection
.
from
,
selection
.
to
,
input
));
triggerNodeInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
...
...
spec/frontend/content_editor/extensions/word_break_spec.js
0 → 100644
View file @
eee97b89
import
WordBreak
from
'
~/content_editor/extensions/word_break
'
;
import
{
createTestEditor
,
createDocBuilder
,
triggerNodeInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/extensions/word_break
'
,
()
=>
{
let
tiptapEditor
;
let
doc
;
let
p
;
let
wordBreak
;
beforeEach
(()
=>
{
tiptapEditor
=
createTestEditor
({
extensions
:
[
WordBreak
]
});
({
builders
:
{
doc
,
p
,
wordBreak
},
}
=
createDocBuilder
({
tiptapEditor
,
names
:
{
wordBreak
:
{
nodeType
:
WordBreak
.
name
},
},
}));
});
it
.
each
`
input | insertedNode
${
'
<wbr>
'
}
|
${()
=>
p
(
wordBreak
())}
${
'
<wbr
'
}
|
${()
=>
p
()}
${
'
wbr>
'
}
|
${()
=>
p
()}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
const
expectedDoc
=
doc
(
insertedNode
());
triggerNodeInputRule
({
tiptapEditor
,
inputRuleText
:
input
});
expect
(
tiptapEditor
.
getJSON
()).
toEqual
(
expectedDoc
.
toJSON
());
});
});
spec/frontend/content_editor/services/track_input_rules_and_shortcuts_spec.js
View file @
eee97b89
...
...
@@ -10,7 +10,7 @@ import Heading from '~/content_editor/extensions/heading';
import
ListItem
from
'
~/content_editor/extensions/list_item
'
;
import
trackInputRulesAndShortcuts
from
'
~/content_editor/services/track_input_rules_and_shortcuts
'
;
import
{
ENTER_KEY
,
BACKSPACE_KEY
}
from
'
~/lib/utils/keys
'
;
import
{
createTestEditor
}
from
'
../test_utils
'
;
import
{
createTestEditor
,
triggerNodeInputRule
}
from
'
../test_utils
'
;
describe
(
'
content_editor/services/track_input_rules_and_shortcuts
'
,
()
=>
{
let
trackingSpy
;
...
...
@@ -70,14 +70,7 @@ describe('content_editor/services/track_input_rules_and_shortcuts', () => {
describe
(
'
when creating a heading using an input rule
'
,
()
=>
{
it
(
'
sends a tracking event indicating that a heading was created using an input rule
'
,
async
()
=>
{
const
nodeName
=
Heading
.
name
;
const
{
view
}
=
editor
;
const
{
selection
}
=
view
.
state
;
// Triggers the event handler that input rules listen to
view
.
someProp
(
'
handleTextInput
'
,
(
f
)
=>
f
(
view
,
selection
.
from
,
selection
.
to
,
'
##
'
));
editor
.
chain
().
insertContent
(
HEADING_TEXT
).
run
();
triggerNodeInputRule
({
tiptapEditor
:
editor
,
inputRuleText
:
'
##
'
});
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
undefined
,
INPUT_RULE_TRACKING_ACTION
,
{
label
:
CONTENT_EDITOR_TRACKING_LABEL
,
property
:
`
${
nodeName
}
`
,
...
...
spec/frontend/content_editor/test_utils.js
View file @
eee97b89
...
...
@@ -119,3 +119,26 @@ export const createTestContentEditorExtension = ({ commands = [] } = {}) => {
},
};
};
export
const
triggerNodeInputRule
=
({
tiptapEditor
,
inputRuleText
})
=>
{
const
{
view
}
=
tiptapEditor
;
const
{
state
}
=
tiptapEditor
;
const
{
selection
}
=
state
;
// Triggers the event handler that input rules listen to
view
.
someProp
(
'
handleTextInput
'
,
(
f
)
=>
f
(
view
,
selection
.
from
,
selection
.
to
,
inputRuleText
));
};
export
const
triggerMarkInputRule
=
({
tiptapEditor
,
inputRuleText
})
=>
{
const
{
view
}
=
tiptapEditor
;
tiptapEditor
.
chain
().
setContent
(
inputRuleText
).
setTextSelection
(
0
).
run
();
const
{
state
}
=
tiptapEditor
;
const
{
selection
}
=
state
;
// Triggers the event handler that input rules listen to
view
.
someProp
(
'
handleTextInput
'
,
(
f
)
=>
f
(
view
,
selection
.
from
,
inputRuleText
.
length
+
1
,
inputRuleText
),
);
};
yarn.lock
View file @
eee97b89
...
...
@@ -1184,10 +1184,10 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.12.tgz#431ec342a7195622f86688bbda82e3166ce8cb28"
integrity sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ==
"@popperjs/core@^2.
8.3
":
version "2.
9
.2"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.
9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353
"
integrity sha512-
VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30
Q==
"@popperjs/core@^2.
9.0
":
version "2.
10
.2"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.
10.2.tgz#0798c03351f0dea1a5a4cabddf26a55a7cbee590
"
integrity sha512-
IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHE
Q==
"@rails/actioncable@6.1.4-1":
version "6.1.4-1"
...
...
@@ -1310,79 +1310,73 @@
dom-accessibility-api "^0.5.1"
pretty-format "^26.4.2"
"@tiptap/core@^2.0.0-beta.1
18
":
version "2.0.0-beta.1
18
"
resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.0.0-beta.1
18.tgz#17e990da525a81d957494171c0c33d17e2039823
"
integrity sha512-
TApketXliv2PZSTf5WP8j/svwzeK795fOf4Ff6A0gDwcVYFPHlny4ZlpawYthyqDoe1fEusyZokVgiDHnb+EzA
==
"@tiptap/core@^2.0.0-beta.1
25
":
version "2.0.0-beta.1
25
"
resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.0.0-beta.1
25.tgz#672a86f21727614bfe8d5bf41544ce83ea4a7c87
"
integrity sha512-
I3lju5hcjK6nhC29jJCdGoRdP0C5nPBHGN8y/fbFmCX0oQ/THuzVdMgaGPpkHjralPPMS3DqHD/Rx8Kbo8zClg
==
dependencies:
"@types/prosemirror-commands" "^1.0.4"
"@types/prosemirror-inputrules" "^1.0.4"
"@types/prosemirror-keymap" "^1.0.4"
"@types/prosemirror-model" "^1.13.2"
"@types/prosemirror-schema-list" "^1.0.3"
"@types/prosemirror-state" "^1.2.7"
"@types/prosemirror-transform" "^1.1.4"
"@types/prosemirror-view" "^1.19.1"
prosemirror-commands "^1.1.10"
prosemirror-inputrules "^1.1.3"
prosemirror-commands "^1.1.11"
prosemirror-keymap "^1.1.3"
prosemirror-model "^1.14.3"
prosemirror-schema-list "^1.1.6"
prosemirror-state "^1.3.4"
prosemirror-transform "^1.3.3"
prosemirror-view "^1.20.
1
"
prosemirror-view "^1.20.
3
"
"@tiptap/extension-blockquote@^2.0.0-beta.15":
version "2.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@tiptap/extension-blockquote/-/extension-blockquote-2.0.0-beta.15.tgz#40be203f7db47e027ea1a5ba42bbb0e33bb6c004"
integrity sha512-Cso44KsYsqKqaNveQmx5KVaLy9krq5AzE9WhGVDBSFqWhvuIJkQYrTRBbOTfUDs/st9VuwJrbjTDD65ow50wEw==
dependencies:
prosemirror-inputrules "^1.1.3"
"@tiptap/extension-blockquote@^2.0.0-beta.19":
version "2.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@tiptap/extension-blockquote/-/extension-blockquote-2.0.0-beta.19.tgz#4b1dfd0ec511f889ddb0f34cd09e57a0db877dc0"
integrity sha512-9y8keXSm4E5mdh/EocdbrJ/H71qyXv2jajRHIsXj1SaJqLaz4JbSQGrX3j2r0ia3KW3YNFFIHl/z33fU70YfGQ==
"@tiptap/extension-bold@^2.0.0-beta.1
5
":
version "2.0.0-beta.1
5
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-bold/-/extension-bold-2.0.0-beta.1
5.tgz#cf9ddb3fc316be9707753ad4e497bfb8a3ebb0c2
"
integrity sha512-
jKyV6iiwhxwa0+7uuKD74jNDVNLNOS1GmU14MgaA95pY5e1fyaRBPPX8Gtt89niz2CLOY711AV17RPZTe/e60w
==
"@tiptap/extension-bold@^2.0.0-beta.1
9
":
version "2.0.0-beta.1
9
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-bold/-/extension-bold-2.0.0-beta.1
9.tgz#9426b5fcb2bfb79082f9efefbafff955d26d023e
"
integrity sha512-
pbYMK3Lz78XFi+1OisdjuGQcjRnzHXeYivh9A4xP1fmSOS6t/lQsu2P2uDhFNXtz45dLcLTOkqnE0j5lj3TGMg
==
"@tiptap/extension-bubble-menu@^2.0.0-beta.
39
":
version "2.0.0-beta.
39
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.0-beta.
39.tgz#8971feeac93e685fc38564173a83ad078b4e7f2a
"
integrity sha512-
hmA+ePR+MnRaTJ5MxoZ3yqOcK54cW2KQllZx16ZwSyM+yU9bXVhfMmyZwqRD7GGQFkrfnPm5QnedXDBYJD19O
Q==
"@tiptap/extension-bubble-menu@^2.0.0-beta.
42
":
version "2.0.0-beta.
42
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.0-beta.
42.tgz#40c2783860721e861b3eb11aa2a076d1944058c2
"
integrity sha512-
H+pGpSk0mK4BRm4RbevgT+ir1bEwlS1dEwi2YIPYVl+JSpuGS2P1jTWeZpCou9cewNuxxwrAarhp4aEvJrL8U
Q==
dependencies:
prosemirror-state "^1.3.4"
prosemirror-view "^1.20.
1
"
tippy.js "^6.3.
1
"
prosemirror-view "^1.20.
3
"
tippy.js "^6.3.
2
"
"@tiptap/extension-bullet-list@^2.0.0-beta.15":
version "2.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.0-beta.15.tgz#74876851a8d227ba1a031d031631ed621c175e05"
integrity sha512-5i44JzsZOh8Ci6CuYRQy6W3jCpYgX0+VuJKeHvZ6Aomy4Qqrtc9Jk43PBmCj91lNUUtH6Io9l+kDrLCumEFnEg==
dependencies:
prosemirror-inputrules "^1.1.3"
"@tiptap/extension-bullet-list@^2.0.0-beta.18":
version "2.0.0-beta.18"
resolved "https://registry.yarnpkg.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.0-beta.18.tgz#ab33426a3ea03cea11863e44aad9e48fc18d478c"
integrity sha512-dOf2Wx9bmgpBQIxhw7b+g1GhbIyIox7FIiIEkkSgqDtx8wPPYlnGwHRxopj4a57VbqRkRtspJZp52/vhP3is5w==
"@tiptap/extension-code-block-lowlight@2.0.0-beta.4
1
":
version "2.0.0-beta.4
1
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-2.0.0-beta.4
1.tgz#3ec98f509bbd5df689de6282f2a3881229262ed7
"
integrity sha512-
2+D/SwcRjWThJ8uFWJT/6B7R+gTUlp4h13/EZqrFMm3YCSOx+bzgTVndog6UJkWyAoNDxkTVwcOyYI4HWdvCiQ
==
"@tiptap/extension-code-block-lowlight@2.0.0-beta.4
7
":
version "2.0.0-beta.4
7
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-2.0.0-beta.4
7.tgz#2a3253f778375e4a420dd77967931b4da7926913
"
integrity sha512-
+k0uACctl4PIrZQrZkiPapYL/Uq8Skc6gBhlvtJ3+U9+U798Rm7QZpGxEe9iXW4KC69E4LtD1JNj27Ofns35Cg
==
dependencies:
"@tiptap/extension-code-block" "^2.0.0-beta.
18
"
"@tiptap/extension-code-block" "^2.0.0-beta.
24
"
"@types/lowlight" "^0.0.3"
lowlight "^1.20.0"
prosemirror-model "^1.14.3"
prosemirror-state "^1.3.4"
prosemirror-view "^1.20.
1
"
prosemirror-view "^1.20.
3
"
"@tiptap/extension-code-block@^2.0.0-beta.
18
":
version "2.0.0-beta.
18
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block/-/extension-code-block-2.0.0-beta.
18.tgz#3b43730cfca1ba26171530951b3cc324a500cb11
"
integrity sha512-
E2gz7ovl9nXLZzheqLyN3hi7A10fCaodDn4DvIl4wiEbKZpF7WFBNeb+FQetWNay9UWNeDO94SCX9+rT9H+yHA
==
"@tiptap/extension-code-block@^2.0.0-beta.
24
":
version "2.0.0-beta.
24
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block/-/extension-code-block-2.0.0-beta.
24.tgz#f3d45d4ae0cdc2bf94ed5e61a5421c72b2bd3a53
"
integrity sha512-
Q6KxBe3FB+dMe/prlfeixXSVqGTmnOmIL2/10B1RzSj7Mj9SgzqQEHZFm3dKVqpYuMOYJ6S6edkW33E0Wq9ahQ
==
dependencies:
prosemirror-
inputrules "^1.1.3
"
prosemirror-
state "^1.3.4
"
"@tiptap/extension-code@^2.0.0-beta.
16
":
version "2.0.0-beta.
16
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-code/-/extension-code-2.0.0-beta.
16.tgz#b258ff90ebe703a4d36ff0c650e6b2cab634028d
"
integrity sha512-
Kakg/RMiVrxjzIkLVDXtbCzRh/9W8dgSG04IhMZNOI8N9vWn8Z78jdUyxEEDTcL/JyWWcMxn9AsJw2U5ajO3pA
==
"@tiptap/extension-code@^2.0.0-beta.
20
":
version "2.0.0-beta.
20
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-code/-/extension-code-2.0.0-beta.
20.tgz#0f5ff7e827ae09c26d23ddc9e62f6375d2f1c0f8
"
integrity sha512-
25twg/rsg5CxTOfDgYzg1GbwrtdzNX2vCQyYsauXfPI1kbrWXdVBYWeL4iHdJk5WElfH9WUbQ4kMGh13/KCG/g
==
"@tiptap/extension-document@^2.0.0-beta.13":
version "2.0.0-beta.13"
...
...
@@ -1397,34 +1391,32 @@
"@types/prosemirror-dropcursor" "^1.0.3"
prosemirror-dropcursor "^1.3.5"
"@tiptap/extension-floating-menu@^2.0.0-beta.3
3
":
version "2.0.0-beta.3
3
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.0-beta.3
3.tgz#11068488f10fce697df2a48f79039e9c1d10eb7b
"
integrity sha512-
8s8DPnHIzXg7E7S/DjuS1AAFZKVYXY0KBKaEd1f2V45YOkKwN9El46Ugk/4Ir3yrrllvnisbP9ol+BAQmI0bMg
==
"@tiptap/extension-floating-menu@^2.0.0-beta.3
6
":
version "2.0.0-beta.3
6
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.0-beta.3
6.tgz#313082e2dd22b6b20c81aa4e98f7c9bcfd47ebe7
"
integrity sha512-
Pm9KK+Y7YUgMrlvqa/MgxV0WOTBiOp8d2kpt7OwGv/ahjc4amv0HFbei7glsiJ56VtOv8lsjiuBS+m2ctWHWVQ
==
dependencies:
prosemirror-state "^1.3.4"
prosemirror-view "^1.20.
1
"
tippy.js "^6.3.
1
"
prosemirror-view "^1.20.
3
"
tippy.js "^6.3.
2
"
"@tiptap/extension-gapcursor@^2.0.0-beta.2
4
":
version "2.0.0-beta.2
4
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.0-beta.2
4.tgz#dc42a3610cea611755c6521e14a6995555e0ad49
"
integrity sha512-
/6Ru0wNLIb3fo30Ar3z/rcakoUA2EIJL9sBFiuyHWTAIujeEaBzA6oG5L4PpP+daKd31JF0I6LjeWMSU9CBSFw
==
"@tiptap/extension-gapcursor@^2.0.0-beta.2
7
":
version "2.0.0-beta.2
7
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.0-beta.2
7.tgz#ced6cb7d39a388e60f8ec22889a015beb81b417a
"
integrity sha512-
Sk041ygN+PhAGiCnDfEtFl8sFmm+clKTHJZJwb6ixcdfgY9xkTpkrgswsAY5fvLnLxZUJvZSDOrsvysbh6M2MQ
==
dependencies:
"@types/prosemirror-gapcursor" "^1.0.4"
prosemirror-gapcursor "^1.2.0"
"@tiptap/extension-hard-break@^2.0.0-beta.2
1
":
version "2.0.0-beta.2
1
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.2
1.tgz#3b9108c7703f23ae186c1038033f0b1354f721bf
"
integrity sha512-
Ukl+wjfLhE0tW7lWRpSPPo2tajjGnEaSc/Irey1JineFf+x/azA9rREzQy0r2AhORTalH7lj/KDmSdG8IT6syA
==
"@tiptap/extension-hard-break@^2.0.0-beta.2
4
":
version "2.0.0-beta.2
4
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.2
4.tgz#8518cf253c24a316824fdac41ffe195fe934bfb2
"
integrity sha512-
0oEHUlQKQZRQmrbKARFPBVVRBWdekR27ro+qg+T6nzEHYSRkJ7dWBswGSNul1v1XEp52JqniZ3el0w1xdYMR0w
==
"@tiptap/extension-heading@^2.0.0-beta.15":
version "2.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@tiptap/extension-heading/-/extension-heading-2.0.0-beta.15.tgz#d62f32a2ec8ce5a6d4e716aa7a45dfb707283848"
integrity sha512-UoXDwEdCV9KiPh0wj0jj2Jt6VDqkoTaSU3d9bmEBLwg1Gjgbuv39JDst7oxSqbf9rgbl3txbeOy35wVBKe9CqA==
dependencies:
prosemirror-inputrules "^1.1.3"
"@tiptap/extension-heading@^2.0.0-beta.18":
version "2.0.0-beta.18"
resolved "https://registry.yarnpkg.com/@tiptap/extension-heading/-/extension-heading-2.0.0-beta.18.tgz#ffaee32ab0286ac047a3f38a52f870538155e30c"
integrity sha512-JJtB1pNHkqC9z/z/6B+xQpDd1w5EaLp++yG8eoY9NCq3ZCRhwULda+Uq7reA9D0PdEDpASsTSS2qLu8ZAtgUeA==
"@tiptap/extension-history@^2.0.0-beta.16":
version "2.0.0-beta.16"
...
...
@@ -1434,28 +1426,29 @@
"@types/prosemirror-history" "^1.0.3"
prosemirror-history "^1.2.0"
"@tiptap/extension-horizontal-rule@^2.0.0-beta.2
1
":
version "2.0.0-beta.2
1
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.0-beta.2
1.tgz#1c73a8547611f53935117ed0079542d958ba37fa
"
integrity sha512-
fgvRGuNEGWAitbcoz6VZSR9gcVIHksTy2QpXPnQC+N9Mi7havaxreYdMZn+oePW/5kdZoZNRx+jsf5DjKomvo
Q==
"@tiptap/extension-horizontal-rule@^2.0.0-beta.2
4
":
version "2.0.0-beta.2
4
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.0-beta.2
4.tgz#ffd6226a98a62c5314012b8c1cc60c90709d0b9c
"
integrity sha512-
kRHJySSJl6QgPvnD+MkN3rzwQgInbq5zE4oxPPbgqYkaAcVSL/q7JBQK1dXMMFaslQlYmEgM6Eh3oU5vo9gUd
Q==
dependencies:
prosemirror-state "^1.3.4"
"@tiptap/extension-image@^2.0.0-beta.1
5
":
version "2.0.0-beta.1
5
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-image/-/extension-image-2.0.0-beta.1
5.tgz#07bdc23c9804c830a394f78242648dd7783a469e
"
integrity sha512-
iMwQ154RPefOxgqTTHjOA735YWesyjBhYvD9fFxRDctM2vLxEYYYFOENXEBCFLNAr94gfaxefCEdkuNYHl9H7
g==
"@tiptap/extension-image@^2.0.0-beta.1
9
":
version "2.0.0-beta.1
9
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-image/-/extension-image-2.0.0-beta.1
9.tgz#40bd95d6d4306d28640bf60a074f20c792f375c6
"
integrity sha512-
17ax4H6Y+xyePfLtL5Z2V2AuWKHziukixHigA+Go4yOdEHlSDvl+x8eNYAZkxy2nH1yFW+uu7Onv8Ln/jWzqL
g==
"@tiptap/extension-italic@^2.0.0-beta.1
5
":
version "2.0.0-beta.1
5
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.1
5.tgz#9a81f686cf221110478935596f0b47a76d4c2f45
"
integrity sha512-
ZCz1vCysLdvOUrwODuyBP0BDaemCLh6ib7qTYoSDKdive9kfn0Vc5Fg3o8xgHrtrUfwKIJz/sWOknjDEGIc9c
w==
"@tiptap/extension-italic@^2.0.0-beta.1
9
":
version "2.0.0-beta.1
9
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.1
9.tgz#8f140e778e8cbd2281df6463d895d3632280c26f
"
integrity sha512-
gEVDqEz25glLuOPW1IOPJy/AIrTgsm164XSi9lnwS1uZa1bmEAKpoALN0+9VzSVaBOmrg2tycMo+iuOhYxFb7
w==
"@tiptap/extension-link@^2.0.0-beta.2
0
":
version "2.0.0-beta.2
0
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.0.0-beta.2
0.tgz#dbb2aa4f01212bbd0c3fb14b563e28f31140eae
2"
integrity sha512-
VljjF5Pmd8xeUxN+Wbypyh8zGEMBWJTwzHUVMbkAEU8IZTdk2gDDcAOiYPyU9+j0vAVbSXi1EAsBRIIlj0OaKQ
==
"@tiptap/extension-link@^2.0.0-beta.2
3
":
version "2.0.0-beta.2
3
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.0.0-beta.2
3.tgz#7591dfe6eb8f65548c2b6a562c2b6ec0568d23c
2"
integrity sha512-
XnNdu6OyB09M4Qsru5j/GsDwj/EFjLQNmGZSQIS3GoaEcxrOImohnEZBZO9WJ11A5IT2GilpRZn2wHscdKoBdA
==
dependencies:
linkifyjs "^3.0.3"
prosemirror-state "^1.3.4"
"@tiptap/extension-list-item@^2.0.0-beta.14":
...
...
@@ -1463,22 +1456,20 @@
resolved "https://registry.yarnpkg.com/@tiptap/extension-list-item/-/extension-list-item-2.0.0-beta.14.tgz#65a9ff9daa11bc9ca8bc2989a891abe68081cfbd"
integrity sha512-t6xwEqP+d5443Ul2Jvqz9kXb3ro7bA7yY9HA0vskm3120WxxHW9jxgxZN+82Ot5Tm7nXOAlsN6vuqnt4idnxZQ==
"@tiptap/extension-ordered-list@^2.0.0-beta.16":
version "2.0.0-beta.16"
resolved "https://registry.yarnpkg.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.0-beta.16.tgz#3ef25a8dd8ddbd2b1aa5ce89d5a2e5a3ecafcf4e"
integrity sha512-3n0h5FBfQqBrN/zqF/Ngoyd1bZxeIRLwWI7ak4KulpvOg5V/yw3sw5CSxr2f13ZI9AgGaTq8yOsTYs9dkCCnsQ==
dependencies:
prosemirror-inputrules "^1.1.3"
"@tiptap/extension-ordered-list@^2.0.0-beta.19":
version "2.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.0-beta.19.tgz#eeab2e8488b84ba7deb93b299370dc187d37c98a"
integrity sha512-PHC5pA1gohxCJF2xMXOzruPt8XWyWLun3vhJL2AIUUzUoGJmSRhsc8Wreeozdlf8HkKrqnsIuk5tp6IEsau6Pw==
"@tiptap/extension-paragraph@^2.0.0-beta.17":
version "2.0.0-beta.17"
resolved "https://registry.yarnpkg.com/@tiptap/extension-paragraph/-/extension-paragraph-2.0.0-beta.17.tgz#f8f0263359b95dec9c10078699697908568d9be9"
integrity sha512-qCQVCf9c2hgaeIdfy22PaoZyW5Vare/1aGkOEAaZma5RjrUbV9hrRKwoW9LsDjnh1EN1fIeKdg02yEhnHWtG8A==
"@tiptap/extension-strike@^2.0.0-beta.
17
":
version "2.0.0-beta.
17
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.
17.tgz#2280ea4e8c50189c2729814d2ae484e58c712a36
"
integrity sha512-
+WRd0RuCK4+jFKNVN+4rHTa5VMqqGDO2uc+TknkqhFqWp/z96OAGlpHJOwPrnW1fLbpjEBBQIr1vVYSw6KgcZg
==
"@tiptap/extension-strike@^2.0.0-beta.
21
":
version "2.0.0-beta.
21
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.
21.tgz#d4b7f0d52a275bc6a4ddc60fe546495d9f77f041
"
integrity sha512-
uYU5k05MChVtZUwWMXAl+xp3IGx/N/+8VZaeJDlIZfg0hew+ZdEGVjwzgCQc1PAuEZriHhbpPg1yOdcHjWga8Q
==
"@tiptap/extension-subscript@^2.0.0-beta.4":
version "2.0.0-beta.4"
...
...
@@ -1505,39 +1496,37 @@
resolved "https://registry.yarnpkg.com/@tiptap/extension-table-row/-/extension-table-row-2.0.0-beta.14.tgz#9ec98c73e309ee966b71ccd140019874d179e0c8"
integrity sha512-mewdlTqgBCyzeZIZ6F08gfuzwsiYjQ7BvABo2UhDfr0+EN2UvfJj0bT3tGgeZhMxT5Js2DXL+c+ZOVJxWJ9faQ==
"@tiptap/extension-table@^2.0.0-beta.3
1
":
version "2.0.0-beta.3
1
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-table/-/extension-table-2.0.0-beta.3
1.tgz#96987fe14017be2fd3e4dbd2ce349eec641724de
"
integrity sha512-
yMqnbxaq2DjaZ6EOE9FLSQSO+qHH7oE0rA+ahQkJdy9KycSboKthXBY7P9JeXxariTyD2B/My9x41cuDLWes9
w==
"@tiptap/extension-table@^2.0.0-beta.3
4
":
version "2.0.0-beta.3
4
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-table/-/extension-table-2.0.0-beta.3
4.tgz#6669d7d937b981e39f7dfa04b9adbabc18f789bc
"
integrity sha512-
DyY+m0PcvdVwh0XynDbsHXu/omUoTzQRQPI4z035J+b2HnLQnYjviNqblY/x8/rGX4qGGjBUmKvQZgwPGg7Df
w==
dependencies:
prosemirror-tables "^1.1.1"
prosemirror-view "^1.20.
1
"
prosemirror-view "^1.20.
3
"
"@tiptap/extension-task-item@^2.0.0-beta.18":
version "2.0.0-beta.18"
resolved "https://registry.yarnpkg.com/@tiptap/extension-task-item/-/extension-task-item-2.0.0-beta.18.tgz#f109c15c997038d8099b64dba4cfc4e219b426e4"
integrity sha512-SmXWdfpDFIBGxWH4Xhb9d6jRSK7jJqsw0GqC5KAtIQ9gNvAQS1j5FqAtWfxlb8FkunIfV6MNnxDP2ZgbKvaEug==
dependencies:
prosemirror-inputrules "^1.1.3"
"@tiptap/extension-task-item@^2.0.0-beta.21":
version "2.0.0-beta.21"
resolved "https://registry.yarnpkg.com/@tiptap/extension-task-item/-/extension-task-item-2.0.0-beta.21.tgz#37a8d30949cefd79b80f107d426d14eb9aeaf567"
integrity sha512-7pCOc+jSlveTGIUUVQO5LOGZN20vb1fAIFMUKAxG756MMI69eVhpdqrXcmovYT8qs//DcvxC/sEjus+ZzFtKVg==
"@tiptap/extension-task-list@^2.0.0-beta.1
7
":
version "2.0.0-beta.1
7
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-task-list/-/extension-task-list-2.0.0-beta.1
7.tgz#c0f40325abf1b6a23868e72ab32f9724a8b42a7b
"
integrity sha512-E
17VBqW2lXF59hCQ/3/Kg0hYSDGvVC4B3W8miZwCXt5WTOl98Gk6qAiDXl+2mDKZvnsLty/YrgkD88OlZSIEbQ
==
"@tiptap/extension-task-list@^2.0.0-beta.1
8
":
version "2.0.0-beta.1
8
"
resolved "https://registry.yarnpkg.com/@tiptap/extension-task-list/-/extension-task-list-2.0.0-beta.1
8.tgz#8b13593e3818995e7b5058bc400ee04c68314d69
"
integrity sha512-E
kPM+We5TP6MWwk+dH3FX/aizNRgVzHDTnnGyMisEievaazi11oKmz72svVCfF+BJJaRdVroCbeRoLWYH7by7w
==
"@tiptap/extension-text@^2.0.0-beta.13":
version "2.0.0-beta.13"
resolved "https://registry.yarnpkg.com/@tiptap/extension-text/-/extension-text-2.0.0-beta.13.tgz#da0af8d9a3f149d20076e15d88c6af21fb6d940f"
integrity sha512-0EtAwuRldCAoFaL/iXgkRepEeOd55rPg5N4FQUN1xTwZT7PDofukP0DG/2jff/Uj17x4uTaJAa9qlFWuNnDvjw==
"@tiptap/vue-2@^2.0.0-beta.
57
":
version "2.0.0-beta.
57
"
resolved "https://registry.yarnpkg.com/@tiptap/vue-2/-/vue-2-2.0.0-beta.
57.tgz#242f7aa47d3c99fdef0e66a05a193b6fef1a95a6
"
integrity sha512-
f8COWq84wOJeLwAmaYsHCqKVbGgMloW+1r4Rz/KhlFb1MNXYeDHibCiW/VtJe7bdae+iRyIwnfmnAp2u5s77hQ
==
"@tiptap/vue-2@^2.0.0-beta.
60
":
version "2.0.0-beta.
60
"
resolved "https://registry.yarnpkg.com/@tiptap/vue-2/-/vue-2-2.0.0-beta.
60.tgz#18b1c3e7f1a94e5a047c6e25f4e176a42b68e2d1
"
integrity sha512-
6V2BucVL440yPy4YqCVxnaq7ZkiR9RmOtLydcNIt9/Abc/iQTkp2Q8qyDUqbGTfGfMEEdpuHd4m9ZRk3cuZ14g
==
dependencies:
"@tiptap/extension-bubble-menu" "^2.0.0-beta.
39
"
"@tiptap/extension-floating-menu" "^2.0.0-beta.3
3
"
prosemirror-view "^1.20.
1
"
"@tiptap/extension-bubble-menu" "^2.0.0-beta.
42
"
"@tiptap/extension-floating-menu" "^2.0.0-beta.3
6
"
prosemirror-view "^1.20.
3
"
"@toast-ui/editor@^2.5.2":
version "2.5.2"
...
...
@@ -1738,14 +1727,6 @@
"@types/prosemirror-model" "*"
"@types/prosemirror-state" "*"
"@types/prosemirror-inputrules@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/prosemirror-inputrules/-/prosemirror-inputrules-1.0.4.tgz#4cb75054d954aa0f6f42099be05eb6c0e6958bae"
integrity sha512-lJIMpOjO47SYozQybUkpV6QmfuQt7GZKHtVrvS+mR5UekA8NMC5HRIVMyaIauJLWhKU6oaNjpVaXdw41kh165g==
dependencies:
"@types/prosemirror-model" "*"
"@types/prosemirror-state" "*"
"@types/prosemirror-keymap@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz#f73c79810e8d0e0a20d153d84f998f02e5afbc0c"
...
...
@@ -7604,6 +7585,11 @@ linkify-it@^3.0.1:
dependencies:
uc.micro "^1.0.1"
linkifyjs@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-3.0.3.tgz#51ea2160b4c60c2c87c27757a1e9eacd422c6076"
integrity sha512-ba5opS5wRHSbDC8VaiDdN14nPGm6LqyRsIPQZGG4qXV4scFdrPneT/uoZOaq9QAPBf6W9I9D/6tNSzWH//815Q==
load-json-file@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
...
...
@@ -9435,10 +9421,10 @@ prosemirror-collab@^1.2.2:
dependencies:
prosemirror-state "^1.0.0"
prosemirror-commands@^1.1.1
0
, prosemirror-commands@^1.1.4:
version "1.1.1
0
"
resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.1
0.tgz#406a6589966e6cd80809cea2d801fb998639b37d
"
integrity sha512-
IWyBBXNAd44RM6NnBPljwq+/CM2oYCQJkF+YhKEAZNwzW0uFdGf4qComhjbKZzqFdu6Iub2ZhNsXgwPibA0lCQ
==
prosemirror-commands@^1.1.1
1
, prosemirror-commands@^1.1.4:
version "1.1.1
1
"
resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.1
1.tgz#369252fcca5397ee7b011b963cc4da45b0b7cb70
"
integrity sha512-
uXDVkOGJbFHocdacMJihrnQCT7tHswO48ewq6ByqLxTwOrI8Y4B4aHvwUbM4epwElv/YjgC+DuqXm/gEHPym4w
==
dependencies:
prosemirror-model "^1.0.0"
prosemirror-state "^1.0.0"
...
...
@@ -9503,14 +9489,14 @@ prosemirror-model@^1.0.0, prosemirror-model@^1.13.1, prosemirror-model@^1.14.3,
dependencies:
orderedmap "^1.1.0"
prosemirror-schema-basic@^1.1.2:
prosemirror-schema-basic@^1.
0.0, prosemirror-schema-basic@^1.
1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prosemirror-schema-basic/-/prosemirror-schema-basic-1.1.2.tgz#4bde5c339c845e0d08ec8fe473064e372ca51ae3"
integrity sha512-G4q8WflNsR1Q33QAV4MQO0xWrHLOJ+BQcKswGXMy626wlQj6c/1n1v4eC9ns+h2y1r/fJHZEgSZnsNhm9lbrDw==
dependencies:
prosemirror-model "^1.2.0"
prosemirror-schema-list@^1.1.4, prosemirror-schema-list@^1.1.6:
prosemirror-schema-list@^1.
0.0, prosemirror-schema-list@^1.
1.4, prosemirror-schema-list@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/prosemirror-schema-list/-/prosemirror-schema-list-1.1.6.tgz#c3e13fe2f74750e4a53ff88d798dc0c4ccca6707"
integrity sha512-aFGEdaCWmJzouZ8DwedmvSsL50JpRkqhQ6tcpThwJONVVmCgI36LJHtoQ4VGZbusMavaBhXXr33zyD2IVsTlkw==
...
...
@@ -9537,10 +9523,14 @@ prosemirror-tables@^1.1.1:
prosemirror-transform "^1.2.1"
prosemirror-view "^1.13.3"
prosemirror-test-builder@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prosemirror-test-builder/-/prosemirror-test-builder-1.0.4.tgz#68d1d1cedcd90cc2fdd976d736ce87b7a5f1e873"
integrity sha512-d5ZwYcf+vd1YI0tgoB7UZ2B2iwb4jmxLGzkHz6ZbkAmPwAY48WpS1frv9BofC2m/MRIMp5SERhISNIANYPsVTg==
prosemirror-test-builder@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/prosemirror-test-builder/-/prosemirror-test-builder-1.0.5.tgz#d05e8f77484aef192d705c46fe648d0319d69000"
integrity sha512-mymXkqJlhcB4JtQpM5buHvfn7SawJ2vRwYzuIUMkky00ILBOPUnwUCAbjA7L8o4hsaQeyHljRCNdpjXKK8KsOw==
dependencies:
prosemirror-model "^1.0.0"
prosemirror-schema-basic "^1.0.0"
prosemirror-schema-list "^1.0.0"
prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1, prosemirror-transform@^1.2.8, prosemirror-transform@^1.3.3:
version "1.3.3"
...
...
@@ -9549,10 +9539,10 @@ prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transfor
dependencies:
prosemirror-model "^1.0.0"
prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.16.5, prosemirror-view@^1.20.
1, prosemirror-view@^1.20.2
:
version "1.20.
2
"
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.20.
2.tgz#fc073def4358fdbd617ea11f5cd4217c5123635d
"
integrity sha512-
zh67dsGCI7QKWDbtLEAdZLmadxBJYRArM8E0z2wfuNGpx4i6ObVGzHjbnblZs2n88IwqHdEA47rEhyUqZ+kAbg
==
prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.16.5, prosemirror-view@^1.20.
3
:
version "1.20.
3
"
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.20.
3.tgz#9781fe59cf0728e749ff4116f8a69d30d8cea943
"
integrity sha512-
2ImL9K/tIEk+aC2GT8shzfmT2U0Y8UQZ13L5AY0A4Tcj09o/ICGE362gKUE3Ze/Xr/nMw61Zv5JMSQUszAj9dw
==
dependencies:
prosemirror-model "^1.14.3"
prosemirror-state "^1.0.0"
...
...
@@ -11180,12 +11170,12 @@ tiny-emitter@^2.0.0:
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c"
integrity sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow==
tippy.js@^6.3.
1
:
version "6.3.
1
"
resolved "https://registry.yarnpkg.com/tippy.js/-/tippy.js-6.3.
1.tgz#3788a007be7015eee0fd589a66b98fb3f8f10181
"
integrity sha512-
JnFncCq+rF1dTURupoJ4yPie5Cof978inW6/4S6kmWV7LL9YOSEVMifED3KdrVPEG+Z/TFH2CDNJcQEfaeuQw
w==
tippy.js@^6.3.
2
:
version "6.3.
2
"
resolved "https://registry.yarnpkg.com/tippy.js/-/tippy.js-6.3.
2.tgz#c03a0b88f170dffeba42f569771801dddc1f6340
"
integrity sha512-
35XVQI7Zl/jHZ51+8eHu/vVRXBjWYGobPm5G9FxOchj4r5dWhghKGS0nm0ARUKZTF96V7pPn7EbXS191NTwld
w==
dependencies:
"@popperjs/core" "^2.
8.3
"
"@popperjs/core" "^2.
9.0
"
tiptap-commands@^1.17.1:
version "1.17.1"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment