Skip to content

Commit 1c2423f

Browse files
Update modules/ROOT/examples/live-demos/comments-callback-with-mentions/index.js
Co-authored-by: Mitchell Crompton <[email protected]>
1 parent ab79f7e commit 1c2423f

File tree

1 file changed

+9
-1
lines changed
  • modules/ROOT/examples/live-demos/comments-callback-with-mentions

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,5 +270,13 @@ tinymce.init({
270270
mentions_menu_hover,
271271
mentions_menu_complete,
272272
mentions_select,
273-
user_id,
273+
tinycomments_fetch_author_info: async (done) => await fetch(`${API_URL}/${id}`)
274+
.then((response) => response.json())
275+
.then((userInfo) => {
276+
done({
277+
author: userInfo.id,
278+
authorName: userInfo.name,
279+
authorAvatar: userInfo.avatar
280+
});
281+
})
274282
});

0 commit comments

Comments
 (0)