Skip to content

Commit 4128bb8

Browse files
committed
DOC-3147: api-version bump to 8.0.0 and update CDN version.
1 parent 1670fa3 commit 4128bb8

File tree

8 files changed

+88
-19
lines changed

8 files changed

+88
-19
lines changed

.api-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.9.0
1+
8.0.0

antora.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ asciidoc:
88
idseparator: '-@'
99
# generic variables
1010
companyurl: https://www.tiny.cloud
11-
cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8-testing/tinymce.min.js
12-
tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8-testing/tinydrive.min.js
13-
tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8-testing/tinymce.min.js
14-
tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8-testing/tinydrive.min.js
11+
cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8/tinymce.min.js
12+
tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8/tinydrive.min.js
13+
tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8/tinymce.min.js
14+
tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8/tinydrive.min.js
1515
webcomponent_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-webcomponent/dist/tinymce-webcomponent.min.js
1616
jquery_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery@2/dist/tinymce-jquery.min.js
1717
openai_proxy_url: https://openai.ai-demo-proxy.tiny.cloud/v1/chat/completions

modules/ROOT/moxiedoc_nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*** xref:apis/tinymce.shortcuts.adoc[tinymce.Shortcuts]
1818
*** xref:apis/tinymce.theme.adoc[tinymce.Theme]
1919
*** xref:apis/tinymce.undomanager.adoc[tinymce.UndoManager]
20+
*** xref:apis/tinymce.userlookup.adoc[tinymce.UserLookup]
2021
*** xref:apis/tinymce.windowmanager.adoc[tinymce.WindowManager]
2122
** tinymce.dom
2223
*** xref:apis/tinymce.dom.bookmarkmanager.adoc[tinymce.dom.BookmarkManager]

modules/ROOT/pages/apis/tinymce.dom.domutils.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Creates HTML string for element. The element will be closed unless an empty inne
269269
[source, javascript]
270270
----
271271
// Creates a html chunk and inserts it at the current selection/caret location
272-
tinymce.activeEditor.selection.setContent(tinymce.activeEditor.dom.createHTML('a', { href: 'test.html' }, 'some line'));
272+
tinymce.activeEditor.insertContent(tinymce.activeEditor.dom.createHTML('a', { href: 'test.html' }, 'some line'));
273273
----
274274

275275
==== Parameters

modules/ROOT/pages/apis/tinymce.dom.selection.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ node the parent element will be returned.|`xref:apis/tinymce.dom.selection.adoc[
4848
|xref:#select[select()]|Selects the specified element. This will place the start and end of the selection range around the element.|`xref:apis/tinymce.dom.selection.adoc[Selection]`
4949
|xref:#selectorChanged[selectorChanged()]|Executes callback when the current selection starts/stops matching the specified selector. The current
5050
state will be passed to the callback as it's first argument.|`xref:apis/tinymce.dom.selection.adoc[Selection]`
51-
|xref:#setContent[setContent()]|Sets the current selection to the specified content. If any contents is selected it will be replaced
51+
|xref:#setContent[setContent()]|This method has been deprecated. Use "editor.insertContent" instead.
52+
53+
Sets the current selection to the specified content. If any contents is selected it will be replaced
5254
with the contents passed in to this function. If there is no selection the contents will be inserted
5355
where the caret is placed in the editor/page.|`xref:apis/tinymce.dom.selection.adoc[Selection]`
5456
|xref:#setCursorLocation[setCursorLocation()]|Move the selection cursor range to the specified node and offset.
@@ -356,6 +358,8 @@ state will be passed to the callback as it's first argument.
356358
----
357359
setContent(content: String, args: Object)
358360
----
361+
This method has been deprecated. Use "editor.insertContent" instead.
362+
359363
Sets the current selection to the specified content. If any contents is selected it will be replaced
360364
with the contents passed in to this function. If there is no selection the contents will be inserted
361365
where the caret is placed in the editor/page.

modules/ROOT/pages/apis/tinymce.editor.adoc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= tinymce.Editor
22
:navtitle: tinymce.Editor
33
:description: This class contains the core logic for a TinyMCE editor.
4-
:keywords: Editor, addCommand, addCommandCallback, addQueryStateHandler, addQueryStateHandlerCallback, addQueryValueHandler, addQueryValueHandlerCallback, addShortcut, addVisual, baseURI, contentCSS, contentStyles, convertURL, destroy, dispatch, documentBaseURI, dom, editorUpload, execCommand, fire, focus, formatter, getBody, getContainer, getContent, getContentAreaContainer, getDoc, getElement, getParam, getWin, hasEditableRoot, hasEventListeners, hasFocus, hasPlugin, hide, id, initialized, insertContent, isDirty, isHidden, load, mode, nodeChanged, notificationManager, off, on, once, options, parser, plugins, queryCommandState, queryCommandSupported, queryCommandValue, remove, render, resetContent, save, schema, selection, serializer, setContent, setDirty, setEditableRoot, setProgressState, show, theme, translate, ui, undoManager, uploadImages, windowManager
4+
:keywords: Editor, addCommand, addCommandCallback, addQueryStateHandler, addQueryStateHandlerCallback, addQueryValueHandler, addQueryValueHandlerCallback, addShortcut, addVisual, baseURI, contentCSS, contentStyles, convertURL, destroy, dispatch, documentBaseURI, dom, editorUid, editorUpload, execCommand, fire, focus, formatter, getBody, getContainer, getContent, getContentAreaContainer, getDoc, getElement, getParam, getWin, hasEditableRoot, hasEventListeners, hasFocus, hasPlugin, hide, id, initialized, insertContent, isDirty, isHidden, load, mode, nodeChanged, notificationManager, off, on, once, options, parser, plugins, queryCommandState, queryCommandSupported, queryCommandValue, remove, render, resetContent, save, schema, selection, serializer, setContent, setDirty, setEditableRoot, setProgressState, show, theme, translate, ui, undoManager, uploadImages, userLookup, windowManager
55
:moxie-type: api
66

77
This class contains the core logic for a TinyMCE editor.
@@ -37,6 +37,7 @@ ed.render();
3737
|contentStyles|`Array`|Array of CSS styles to add to head of document when the editor loads.|`xref:apis/tinymce.editor.adoc[Editor]`
3838
|documentBaseURI|`xref:apis/tinymce.util.uri.adoc[URI]`|URI object to document configured for the TinyMCE instance.|`xref:apis/tinymce.editor.adoc[Editor]`
3939
|dom|`xref:apis/tinymce.dom.domutils.adoc[DOMUtils]`|DOM instance for the editor.|`xref:apis/tinymce.editor.adoc[Editor]`
40+
|editorUid|`String`|A uuid string to uniquely identify an editor across any page.|`xref:apis/tinymce.editor.adoc[Editor]`
4041
|editorUpload|`xref:apis/tinymce.editorupload.adoc[EditorUpload]`|Editor upload API|`xref:apis/tinymce.editor.adoc[Editor]`
4142
|formatter|`xref:apis/tinymce.formatter.adoc[Formatter]`|Formatter instance.|`xref:apis/tinymce.editor.adoc[Editor]`
4243
|id|`String`|Editor instance id, normally the same as the div/textarea that was replaced.|`xref:apis/tinymce.editor.adoc[Editor]`
@@ -52,6 +53,7 @@ ed.render();
5253
|theme|`xref:apis/tinymce.theme.adoc[Theme]`|Reference to the theme instance that was used to generate the UI.|`xref:apis/tinymce.editor.adoc[Editor]`
5354
|ui|`xref:apis/tinymce.editor.ui.ui.adoc[Ui]`|Editor ui components|`xref:apis/tinymce.editor.adoc[Editor]`
5455
|undoManager|`xref:apis/tinymce.undomanager.adoc[UndoManager]`|Undo manager instance, responsible for handling undo levels.|`xref:apis/tinymce.editor.adoc[Editor]`
56+
|userLookup|`xref:apis/tinymce.userlookup.adoc[UserLookup]`|Editor user lookup API|`xref:apis/tinymce.editor.adoc[Editor]`
5557
|windowManager|`xref:apis/tinymce.windowmanager.adoc[WindowManager]`|Window manager reference, use this to open new windows and dialogs.|`xref:apis/tinymce.editor.adoc[Editor]`
5658
|===
5759

@@ -723,7 +725,7 @@ Returns true/false if the editor is hidden or not.
723725
=== load()
724726
[source, javascript]
725727
----
726-
load(args: Object): String
728+
load(args: Object)
727729
----
728730
Loads contents from the textarea, input or other element that got converted into an editor instance.
729731
This method will move the contents from that textarea, input or other element into the editor by using setContent
@@ -733,10 +735,6 @@ so all events etc that method has will get dispatched as well.
733735

734736
* `args (Object)` - Optional content object, this gets passed around through the whole load process.
735737

736-
==== Return value
737-
738-
* `String` - HTML string that got set into the editor.
739-
740738
'''
741739

742740
[[nodeChanged]]
@@ -949,7 +947,7 @@ so all events etc that method has will get dispatched as well.
949947
=== setContent()
950948
[source, javascript]
951949
----
952-
setContent(content: String, args: Object): String
950+
setContent(content: String, args: Object)
953951
----
954952
Sets the specified content to the editor instance, this will cleanup the content before it gets set using
955953
the different cleanup rules options.
@@ -975,10 +973,6 @@ tinymce.activeEditor.setContent('<p>Some html</p>', { format: 'html' });
975973
* `content (String)` - Content to set to editor, normally HTML contents but can be other formats as well.
976974
* `args (Object)` - Optional content object, this gets passed around through the whole set process.
977975

978-
==== Return value
979-
980-
* `String` - HTML string that got set into the editor.
981-
982976
'''
983977

984978
[[setDirty]]

modules/ROOT/pages/apis/tinymce.root.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= tinymce
22
:navtitle: tinymce
33
:description: TinyMCE core class.
4-
:keywords: DOM, PluginManager, ScriptLoader, ThemeManager, activeEditor, add, addI18n, baseURI, baseURL, createEditor, defaultOptions, documentBaseURL, each, execCommand, explode, get, grep, hasOwnProperty, i18n, inArray, init, is, isArray, majorVersion, makeMap, map, minorVersion, overrideDefaults, releaseDate, remove, resolve, setActive, suffix, toArray, translate, triggerSave, trim, walk
4+
:keywords: DOM, PluginManager, ScriptLoader, ThemeManager, activeEditor, add, addI18n, baseURI, baseURL, createEditor, defaultOptions, documentBaseURL, each, execCommand, explode, get, grep, hasOwnProperty, i18n, inArray, init, is, isArray, majorVersion, makeMap, map, minorVersion, overrideDefaults, pageUid, releaseDate, remove, resolve, setActive, suffix, toArray, translate, triggerSave, trim, walk
55
:moxie-type: api
66

77
TinyMCE core class.
@@ -26,6 +26,7 @@ TinyMCE core class.
2626
|i18n|`Object`|Collection of language pack data.|`xref:apis/tinymce.root.adoc[tinymce]`
2727
|majorVersion|`String`|Major version of TinyMCE build.|`xref:apis/tinymce.root.adoc[tinymce]`
2828
|minorVersion|`String`|Minor version of TinyMCE build.|`xref:apis/tinymce.root.adoc[tinymce]`
29+
|pageUid|`String`|A uuid string to anonymously identify the page tinymce is loaded in|`xref:apis/tinymce.root.adoc[tinymce]`
2930
|releaseDate|`String`|Release date of TinyMCE build.|`xref:apis/tinymce.root.adoc[tinymce]`
3031
|suffix|`String`|Current suffix to add to each plugin/theme that gets loaded for example ".min".|`xref:apis/tinymce.root.adoc[tinymce]`
3132
|===
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
= tinymce.UserLookup
2+
:navtitle: tinymce.UserLookup
3+
:description: TinyMCE User Lookup API Handles user information retrieval and caching.
4+
:keywords: fetchUsers, userId
5+
:moxie-type: api
6+
7+
TinyMCE User Lookup API Handles user information retrieval and caching.
8+
9+
[[examples]]
10+
== Examples
11+
[source, javascript]
12+
----
13+
// Get the current user's ID from the editor options, or defaults to 'Anonymous'.
14+
tinymce.activeEditor.userLookup.userId;
15+
16+
// Fetch user information by IDs which returns a record of promises
17+
const userPromises = tinymce.activeEditor.userLookup.fetchUsers(['user-1', 'user-2']);
18+
19+
// Access individual promises by user ID
20+
userPromises['user-1'].then(user => console.log('User 1:', user));
21+
userPromises['user-2'].then(user => console.log('User 2:', user));
22+
23+
// Or wait for all promises
24+
Promise.all(Object.values(userPromises)).then((users) => {
25+
users.forEach(user => console.log('User found:', user));
26+
}).catch((error) => {
27+
console.error('Error fetching users:', error);
28+
});
29+
----
30+
31+
[[summary]]
32+
== Summary
33+
34+
[[properties]]
35+
=== Properties
36+
[cols="2,1,4,1",options="header"]
37+
|===
38+
|Name|Type|Summary|Defined by
39+
|userId|`String`|The current user's ID retrieved from the editor options, or defaults to 'Anonymous'.|`xref:apis/tinymce.userlookup.adoc[UserLookup]`
40+
|===
41+
42+
[[methods-summary]]
43+
=== Methods
44+
[cols="2,5,1",options="header"]
45+
|===
46+
|Name|Summary|Defined by
47+
|xref:#fetchUsers[fetchUsers()]|Fetches user information using a provided array of userIds.|`xref:apis/tinymce.userlookup.adoc[UserLookup]`
48+
|===
49+
50+
[[methods]]
51+
== Methods
52+
53+
[[fetchUsers]]
54+
=== fetchUsers()
55+
[source, javascript]
56+
----
57+
fetchUsers(userIds: string[]): Record<UserId, Promise<User>>
58+
----
59+
Fetches user information using a provided array of userIds.
60+
61+
==== Parameters
62+
63+
* `userIds (string[])` - - A list of user IDs to fetch information for.
64+
65+
==== Return value
66+
67+
* `Record<UserId, Promise<User>>` - An object where each key is a user ID and its value is a Promise that resolves to the user's data or rejects if the user is not found.
68+
69+
'''

0 commit comments

Comments
 (0)