Skip to content

Commit 0d87dda

Browse files
committed
DOC-3251: Remove duplicated properties from demo.
1 parent 03f50ba commit 0d87dda

File tree

1 file changed

+3
-5
lines changed
  • modules/ROOT/examples/live-demos/comments-embedded-with-mentions

1 file changed

+3
-5
lines changed

modules/ROOT/examples/live-demos/comments-embedded-with-mentions/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const API_URL = 'https://demouserdirectory.tiny.cloud/v1/users';
22

3+
const user_id = 'james-wilson';
4+
35
const mentions_fetch = async (query, success) => {
46
const searchPhrase = query.term.toLowerCase();
57
await fetch(`${API_URL}?q=${encodeURIComponent(searchPhrase)}`)
@@ -59,8 +61,6 @@ const tinycomments_can_resolve = (req, done, _fail) => {
5961
done({ canResolve: allowed });
6062
};
6163

62-
const user_id = 'james-wilson';
63-
6464
tinymce.init({
6565
selector: 'textarea#comments-embedded-with-mentions',
6666
plugins: [ 'tinycomments', 'mentions', 'help', 'code', 'quickbars', 'link', 'lists', 'image' ],
@@ -80,6 +80,7 @@ tinymce.init({
8080
tinycomments_mentions_enabled: true,
8181
tinycomments_can_resolve,
8282
tinycomments_author: user_id,
83+
tinycomments_author_name: 'James Wilson',
8384
tinycomments_author_avatar: 'https://sneak-preview.tiny.cloud/demouserdirectory/images/employee_james-wilson_128_52f19412.jpg',
8485

8586
mentions_item_type: 'profile',
@@ -89,7 +90,4 @@ tinymce.init({
8990
mentions_menu_hover,
9091
mentions_menu_complete,
9192
mentions_select,
92-
tinycomments_author: user_id,
93-
tinycomments_author_name: 'James Wilson',
94-
tinycomments_author_avatar: 'https://sneak-preview.tiny.cloud/demouserdirectory/images/employee_james-wilson_128_52f19412.jpg'
9593
});

0 commit comments

Comments
 (0)