Skip to content

Commit 0298cab

Browse files
committed
DOC-3161: Update new option
1 parent 3381ebb commit 0298cab

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ import ('https://cdn.jsdelivr.net/npm/@faker-js/faker@9/dist/index.min.js').then
322322
};
323323

324324
// Read the above `getAuthorInfo` function to see how this could be implemented
325-
const tinycomments_fetch_author_info = (_, done) => done(getAuthorInfo(currentUid));
325+
const tinycomments_fetch_author_info = (done) => done(getAuthorInfo(currentUid));
326326

327327
tinymce.init({
328328
selector: 'textarea#comments-callback-with-mentions',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ const tinycomments_fetch = (conversationUids, done) => {
212212
};
213213

214214
// Read the above `getAuthorInfo` function to see how this could be implemented
215-
const tinycomments_fetch_author_info = (_, done) => done(getAuthorInfo(currentUid));
215+
const tinycomments_fetch_author_info = (done) => done(getAuthorInfo(currentUid));
216216

217217
tinymce.init({
218218
selector: 'textarea#comments-callback',

modules/ROOT/partials/configuration/tinycomments_fetch_author_info.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The {pluginname} plugin uses the `+tinycomments_fetch_author_info+` callback fun
55

66
This function is called whenever a comment is rendered, and it allows the editor to display the author’s name and avatar based on the current user.
77

8-
The `+tinycomments_fetch_author_info+` function is passed a request (`+req+`) object as the first parameter, and a `+done+` callback as the second.
8+
The `+tinycomments_fetch_author_info+` function is passed a `+done+` callback parameter.
99

1010
The function must call `+done+` with an object containing the following properties:
1111

@@ -16,7 +16,7 @@ The function must call `+done+` with an object containing the following properti
1616
.Example of `+tinycomments_fetch_author_info+` function
1717
[source,js]
1818
----
19-
const tinycomments_fetch_author_info = (_, done) => {
19+
const tinycomments_fetch_author_info = (done) => {
2020
setTimeout(() => done({
2121
author: currentUser.id, // Maps to the `author` field in the comment object
2222
authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object. (optional)
@@ -33,10 +33,10 @@ const currentUser = {
3333
name: 'John Smith',
3434
fullName: 'John Smith',
3535
description: 'Company Founder',
36-
image: '{{imagesdir}}/logos/android-chrome-192x192.png'
36+
image: '{{imagesdir}}/users/johnsmith.png'
3737
};
3838
39-
const tinycomments_fetch_author_info = (_, done) => {
39+
const tinycomments_fetch_author_info = (done) => {
4040
fetch('https://example.api.com/currentUser')
4141
.then(res => res.json())
4242
.then(currentUser => {

0 commit comments

Comments
 (0)