diff --git a/webapp/components/Editor/Editor.spec.js b/webapp/components/Editor/Editor.spec.js index 83c8ab26e..81c6cce9b 100644 --- a/webapp/components/Editor/Editor.spec.js +++ b/webapp/components/Editor/Editor.spec.js @@ -71,26 +71,38 @@ describe('Editor.vue', () => { describe('optional extensions', () => { it('sets the Mention items to the users', () => { - propsData.users = [{ id: 'u345' }] + propsData.users = [ + { + id: 'u345', + }, + ] wrapper = Wrapper() expect(wrapper.vm.editor.extensions.options.mention.items()).toEqual(propsData.users) }) it('mentions is not an option when there are no users', () => { expect(wrapper.vm.editor.extensions.options).toEqual( - expect.not.objectContaining({ mention: expect.anything() }), + expect.not.objectContaining({ + mention: expect.anything(), + }), ) }) it('sets the Hashtag items to the hashtags', () => { - propsData.hashtags = [{ id: 'Frieden' }] + propsData.hashtags = [ + { + id: 'Frieden', + }, + ] wrapper = Wrapper() expect(wrapper.vm.editor.extensions.options.hashtag.items()).toEqual(propsData.hashtags) }) it('hashtags is not an option when there are no hashtags', () => { expect(wrapper.vm.editor.extensions.options).toEqual( - expect.not.objectContaining({ hashtag: expect.anything() }), + expect.not.objectContaining({ + hashtag: expect.anything(), + }), ) }) }) diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index f54feb292..063e6df75 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -18,9 +18,7 @@
{{ $t('editor.hashtag.addHashtag') }}
-
- #{{ query }} -
+
#{{ query }}
@@ -30,19 +28,19 @@
-
- {{ $t('editor.mention.noUsersFound') }} -
+
{{ $t('editor.mention.noUsersFound') }}
-
- {{ $t('editor.hashtag.noHashtagsFound') }} -
+
{{ $t('editor.hashtag.noHashtagsFound') }}
{{ $t('editor.hashtag.addHashtag') }}
-
- #{{ query }} -
+
#{{ query }}
@@ -128,18 +126,14 @@ size="small" :ghost="!isActive.heading({ level: 3 })" @click.prevent="commands.heading({ level: 3 })" - > - H3 - + >H3 - H4 - + >H4 [] }, // If 'null', than the Mention extention is not assigned. - hashtags: { type: Array, default: () => [] }, // If 'null', than the Hashtag extention is not assigned. + users: { type: Array, default: () => null }, // If 'null', than the Mention extention is not assigned. + hashtags: { type: Array, default: () => null }, // If 'null', than the Hashtag extention is not assigned. value: { type: String, default: '' }, doc: { type: Object, default: () => {} }, },