Skip to content

Commit 55674d4

Browse files
author
Sorita Heng
committed
fix UID options
1 parent 92a6b0a commit 55674d4

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[[fetch_users]]
2+
== `fetch_users`
3+
4+
A **required callback function** that fetches user data for the Suggested Edits view. This function is called with an array of user IDs and should return a `Promise` that resolves to an array of user objects. The callback is used by the xref:#userlookupapi[`UserLookup API`].
5+
6+
*Type:* `Function`
7+
8+
*Parameters:*
9+
- `ids` (`Array<string>`): An array of user IDs to fetch.
10+
11+
*Returns:*
12+
- `Promise<Array<Object>>`: A promise that resolves to an array of user objects.
13+
14+
.Example
15+
[source,javascript]
16+
----
17+
tinymce.init({
18+
selector: 'textarea', // Change this value according to your HTML
19+
plugins: 'suggestededits',
20+
toolbar: 'suggestededits',
21+
user_id: 'unique-identifier', // Replace this with a unique string to identify the user
22+
fetch_users: (ids) => fetch(`/api/users?ids=${ids.join(',')}`)
23+
.then((r) => r.json())
24+
});
25+
----

modules/ROOT/partials/configuration/userlookup_userid.adoc renamed to modules/ROOT/partials/configuration/suggestededits_user_id.adoc

File renamed without changes.

modules/ROOT/partials/configuration/userlookup_fetch.adoc

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)