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/8.0-release-notes.adoc
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,6 +351,68 @@ The `+chevronTooltip+` property provides custom tooltip text for the chevron but
351
351
352
352
For more information, see xref:custom-split-toolbar-button.adoc[Split toolbar buttons].
353
353
354
+
=== New User Lookup API for retrieving and caching user details
355
+
// #TINY-11974
356
+
357
+
{productname} {release-version} introduces a new xref:userlookup.adoc[User Lookup API] that enables integrations to retrieve and cache user details (such as names and avatars) and identify the current user within the editor. This API is particularly useful when building features that rely on user context, such as commenting systems or displaying lists of elements containing user information.
358
+
359
+
The User Lookup API provides efficient user data management with built-in caching, reducing redundant network requests and improving performance. It can be used as a universal solution for `+<pluginname>_author+` and `+<pluginname>_author_avatar+` configurations across various plugins, including currently supported plugins such as **Suggested Edits**, **Comments**, and **Revision History**.
360
+
361
+
Key features include:
362
+
363
+
* **Current user identification**: Set and retrieve the active user's ID using the new xref:userlookup.adoc#user_id[`user_id`] configuration option
364
+
* **Flexible user fetching**: Configure custom user data retrieval through the xref:userlookup.adoc#fetch_users[`fetch_users`] callback function
365
+
* **Built-in caching**: Automatic caching of user data to minimize API calls
366
+
* **Fallback handling**: Automatic generation of default user information when custom fetch functions are not provided
367
+
* **Extensible user objects**: Support for custom metadata through the `custom` property
368
+
369
+
==== Basic configuration
370
+
371
+
The API requires two main configuration options:
372
+
373
+
[source,js]
374
+
----
375
+
tinymce.init({
376
+
selector: 'textarea',
377
+
user_id: 'alextaylor', // Set the current user's unique identifier
378
+
fetch_users: (userIds) => {
379
+
// Return a Promise that resolves to an array of user objects
0 commit comments