diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-08-14 20:25:34 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-08-25 12:04:53 +0300 |
commit | a84270bb37d5bfffe1162ae4da74e5bd9c06c043 (patch) | |
tree | a3b866368805fa1c64873611dcda65a739a9d691 /src/extensions | |
parent | edca2da80b1a2d3b3d4db39743a8764c41f484ed (diff) |
Fix linting
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/extensions')
-rw-r--r-- | src/extensions/Mention.js | 26 | ||||
-rw-r--r-- | src/extensions/index.js | 2 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/extensions/Mention.js b/src/extensions/Mention.js index 38024e141..0fcc64753 100644 --- a/src/extensions/Mention.js +++ b/src/extensions/Mention.js @@ -7,15 +7,15 @@ const getAvatarUrl = (user, size) => { user, size, }) -}; +} export default TipTapMention.extend({ parseHTML() { return [ { - tag: `span[data-type="user"]`, - getAttrs: element => ((element.getAttribute('data-type') === "user") - && (element.getAttribute('class') === "mention") + tag: 'span[data-type="user"]', + getAttrs: element => ((element.getAttribute('data-type') === 'user') + && (element.getAttribute('class') === 'mention') && null), priority: 100, }, @@ -29,13 +29,13 @@ export default TipTapMention.extend({ 'span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name, - 'class': 'mention-bubble mention-bubble--primary', - 'contenteditable': false, + class: 'mention-bubble mention-bubble--primary', + contenteditable: false, }), [ 'span', { - 'class': 'mention-bubble__wrapper', + class: 'mention-bubble__wrapper', }, [ 'span', @@ -45,16 +45,16 @@ export default TipTapMention.extend({ [ 'span', { - 'class': `mention-bubble__icon mention-bubble__icon--with-avatar`, - 'style': avatarUrl ? `background-image: url('${avatarUrl}')` : '', + class: 'mention-bubble__icon mention-bubble__icon--with-avatar', + style: avatarUrl ? `background-image: url('${avatarUrl}')` : '', }, ], [ 'span', { - 'role': 'heading', - 'class': 'mention-bubble__title', - 'title': node.attrs.id, + role: 'heading', + class: 'mention-bubble__title', + title: node.attrs.id, }, ], ], @@ -67,4 +67,4 @@ export default TipTapMention.extend({ state.write(`@[${node.attrs.id}](mention://user/${node.attrs.id})`) state.write(' ') }, -});
\ No newline at end of file +}) diff --git a/src/extensions/index.js b/src/extensions/index.js index 02c16b3ff..e15259814 100644 --- a/src/extensions/index.js +++ b/src/extensions/index.js @@ -29,7 +29,7 @@ import Markdown from './Markdown.js' import PlainText from './PlainText.js' import RichText from './RichText.js' import KeepSyntax from './KeepSyntax.js' -import Mention from './Mention' +import Mention from './Mention.js' export { Emoji, |