You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/comments-embedded-mode.adoc
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,35 @@ To add the {pluginname} plugin in embedded mode to the {productname}, configure
11
11
12
12
[source,js]
13
13
----
14
+
const userDirectory = {
15
+
'author': {
16
+
id: 'author',
17
+
name: 'Name of the commenter',
18
+
avatar: 'https://example.com/avatar/john.png'
19
+
},
20
+
};
21
+
14
22
tinymce.init({
15
23
selector: 'textarea', // change this value according to your html
16
24
plugins: 'tinycomments',
17
25
toolbar: 'addcomment showcomments',
18
-
tinycomments_author: 'author',
19
-
tinycomments_author_name: 'Name of the commenter',
26
+
user_id: 'author',
27
+
fetch_users: (userIds) => {
28
+
const results = userIds.map((id) => {
29
+
const user = Object.values(userDirectory).find((user) => user.id === id);
30
+
if (user) {
31
+
return user;
32
+
} else {
33
+
throw new Error(`User ${id} not found`);
34
+
}
35
+
});
36
+
return Promise.resolve(results);
37
+
},
20
38
tinycomments_mode: 'embedded'
21
39
});
22
40
----
23
41
24
-
This is the minimum recommended setup for the {pluginname} plugin in embedded mode. If the `+tinycomments_author+` and `+tinycomments_author_name+` options are not configured, all users will be assigned the name "_ANON_".
42
+
This is the minimum recommended setup for the {pluginname} plugin in embedded mode. If the `+user_id+` or `+tinycomments_author+` options are not configured, all users will be assigned the name "_ANON_".
Copy file name to clipboardExpand all lines: modules/ROOT/partials/configuration/tinycomments_can_delete.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
[[tinycomments_can_delete]]
2
2
== `+tinycomments_can_delete+`
3
3
4
-
_Optional_: This option sets the author permissions for _deleting comment conversations_. If the `+tinycomments_can_delete+` option is not included, the current author (`+tinycomments_author+`) cannot delete comment conversations created by other authors.
4
+
_Optional_: This option sets the author permissions for _deleting comment conversations_. If the `+tinycomments_can_delete+` option is not included, the current author (`+user_id+`) cannot delete comment conversations created by other authors.
Copy file name to clipboardExpand all lines: modules/ROOT/partials/configuration/tinycomments_can_delete_comment.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
[[tinycomments_can_delete_comment]]
2
2
== `+tinycomments_can_delete_comment+`
3
3
4
-
_Optional_: This option sets the author permissions for _deleting comments_. If the `+tinycomments_can_delete_comment+` option is not included, the current author (`+tinycomments_author+`) **cannot** delete comments added by other authors.
4
+
_Optional_: This option sets the author permissions for _deleting comments_. If the `+tinycomments_can_delete_comment+` option is not included, the current author (`+user_id+`) **cannot** delete comments added by other authors.
Copy file name to clipboardExpand all lines: modules/ROOT/partials/configuration/tinycomments_can_edit_comment.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
[[tinycomments_can_edit_comment]]
2
2
== `+tinycomments_can_edit_comment+`
3
3
4
-
_Optional_: This option sets the author permissions for _editing comments_. If the `+tinycomments_can_edit_comment+` option is not included, the current author (`+tinycomments_author+`) cannot edit comments added by other authors.
4
+
_Optional_: This option sets the author permissions for _editing comments_. If the `+tinycomments_can_edit_comment+` option is not included, the current author (`+user_id+`) cannot edit comments added by other authors.
0 commit comments