File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff 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' ,
Original file line number Diff line number Diff 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
217217tinymce . init ( {
218218 selector : 'textarea#comments-callback' ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ The {pluginname} plugin uses the `+tinycomments_fetch_author_info+` callback fun
55
66This 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
1010The 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 => {
You can’t perform that action at this time.
0 commit comments