Browse Source

DOC-3147: api-version bump to 8.0.0 and update CDN version.

pull/3734/head
Karl Kemister-Sheppard 6 days ago
parent
commit
4128bb84cd
  1. 2
      .api-version
  2. 8
      antora.yml
  3. 1
      modules/ROOT/moxiedoc_nav.adoc
  4. 2
      modules/ROOT/pages/apis/tinymce.dom.domutils.adoc
  5. 6
      modules/ROOT/pages/apis/tinymce.dom.selection.adoc
  6. 16
      modules/ROOT/pages/apis/tinymce.editor.adoc
  7. 3
      modules/ROOT/pages/apis/tinymce.root.adoc
  8. 69
      modules/ROOT/pages/apis/tinymce.userlookup.adoc

2
.api-version

@ -1 +1 @@
7.9.0
8.0.0

8
antora.yml

@ -8,10 +8,10 @@ asciidoc:
idseparator: '-@'
# generic variables
companyurl: https://www.tiny.cloud
cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8-testing/tinymce.min.js
tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8-testing/tinydrive.min.js
tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8-testing/tinymce.min.js
tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8-testing/tinydrive.min.js
cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8/tinymce.min.js
tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8/tinydrive.min.js
tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8/tinymce.min.js
tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8/tinydrive.min.js
webcomponent_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-webcomponent/dist/tinymce-webcomponent.min.js
jquery_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery@2/dist/tinymce-jquery.min.js
openai_proxy_url: https://openai.ai-demo-proxy.tiny.cloud/v1/chat/completions

1
modules/ROOT/moxiedoc_nav.adoc

@ -17,6 +17,7 @@
*** xref:apis/tinymce.shortcuts.adoc[tinymce.Shortcuts]
*** xref:apis/tinymce.theme.adoc[tinymce.Theme]
*** xref:apis/tinymce.undomanager.adoc[tinymce.UndoManager]
*** xref:apis/tinymce.userlookup.adoc[tinymce.UserLookup]
*** xref:apis/tinymce.windowmanager.adoc[tinymce.WindowManager]
** tinymce.dom
*** xref:apis/tinymce.dom.bookmarkmanager.adoc[tinymce.dom.BookmarkManager]

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

@ -269,7 +269,7 @@ Creates HTML string for element. The element will be closed unless an empty inne
[source, javascript]
----
// Creates a html chunk and inserts it at the current selection/caret location
tinymce.activeEditor.selection.setContent(tinymce.activeEditor.dom.createHTML('a', { href: 'test.html' }, 'some line'));
tinymce.activeEditor.insertContent(tinymce.activeEditor.dom.createHTML('a', { href: 'test.html' }, 'some line'));
----
==== Parameters

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

@ -48,7 +48,9 @@ node the parent element will be returned.|`xref:apis/tinymce.dom.selection.adoc[
|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]`
|xref:#selectorChanged[selectorChanged()]|Executes callback when the current selection starts/stops matching the specified selector. The current
state will be passed to the callback as it's first argument.|`xref:apis/tinymce.dom.selection.adoc[Selection]`
|xref:#setContent[setContent()]|Sets the current selection to the specified content. If any contents is selected it will be replaced
|xref:#setContent[setContent()]|This method has been deprecated. Use "editor.insertContent" instead.
Sets the current selection to the specified content. If any contents is selected it will be replaced
with the contents passed in to this function. If there is no selection the contents will be inserted
where the caret is placed in the editor/page.|`xref:apis/tinymce.dom.selection.adoc[Selection]`
|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.
----
setContent(content: String, args: Object)
----
This method has been deprecated. Use "editor.insertContent" instead.
Sets the current selection to the specified content. If any contents is selected it will be replaced
with the contents passed in to this function. If there is no selection the contents will be inserted
where the caret is placed in the editor/page.

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

@ -1,7 +1,7 @@
= tinymce.Editor
:navtitle: tinymce.Editor
:description: This class contains the core logic for a TinyMCE editor.
: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
: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
:moxie-type: api
This class contains the core logic for a TinyMCE editor.
@ -37,6 +37,7 @@ ed.render();
|contentStyles|`Array`|Array of CSS styles to add to head of document when the editor loads.|`xref:apis/tinymce.editor.adoc[Editor]`
|documentBaseURI|`xref:apis/tinymce.util.uri.adoc[URI]`|URI object to document configured for the TinyMCE instance.|`xref:apis/tinymce.editor.adoc[Editor]`
|dom|`xref:apis/tinymce.dom.domutils.adoc[DOMUtils]`|DOM instance for the editor.|`xref:apis/tinymce.editor.adoc[Editor]`
|editorUid|`String`|A uuid string to uniquely identify an editor across any page.|`xref:apis/tinymce.editor.adoc[Editor]`
|editorUpload|`xref:apis/tinymce.editorupload.adoc[EditorUpload]`|Editor upload API|`xref:apis/tinymce.editor.adoc[Editor]`
|formatter|`xref:apis/tinymce.formatter.adoc[Formatter]`|Formatter instance.|`xref:apis/tinymce.editor.adoc[Editor]`
|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();
|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]`
|ui|`xref:apis/tinymce.editor.ui.ui.adoc[Ui]`|Editor ui components|`xref:apis/tinymce.editor.adoc[Editor]`
|undoManager|`xref:apis/tinymce.undomanager.adoc[UndoManager]`|Undo manager instance, responsible for handling undo levels.|`xref:apis/tinymce.editor.adoc[Editor]`
|userLookup|`xref:apis/tinymce.userlookup.adoc[UserLookup]`|Editor user lookup API|`xref:apis/tinymce.editor.adoc[Editor]`
|windowManager|`xref:apis/tinymce.windowmanager.adoc[WindowManager]`|Window manager reference, use this to open new windows and dialogs.|`xref:apis/tinymce.editor.adoc[Editor]`
|===
@ -723,7 +725,7 @@ Returns true/false if the editor is hidden or not.
=== load()
[source, javascript]
----
load(args: Object): String
load(args: Object)
----
Loads contents from the textarea, input or other element that got converted into an editor instance.
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.
* `args (Object)` - Optional content object, this gets passed around through the whole load process.
==== Return value
* `String` - HTML string that got set into the editor.
'''
[[nodeChanged]]
@ -949,7 +947,7 @@ so all events etc that method has will get dispatched as well.
=== setContent()
[source, javascript]
----
setContent(content: String, args: Object): String
setContent(content: String, args: Object)
----
Sets the specified content to the editor instance, this will cleanup the content before it gets set using
the different cleanup rules options.
@ -975,10 +973,6 @@ tinymce.activeEditor.setContent('<p>Some html</p>', { format: 'html' });
* `content (String)` - Content to set to editor, normally HTML contents but can be other formats as well.
* `args (Object)` - Optional content object, this gets passed around through the whole set process.
==== Return value
* `String` - HTML string that got set into the editor.
'''
[[setDirty]]

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

@ -1,7 +1,7 @@
= tinymce
:navtitle: tinymce
:description: TinyMCE core class.
: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
: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
:moxie-type: api
TinyMCE core class.
@ -26,6 +26,7 @@ TinyMCE core class.
|i18n|`Object`|Collection of language pack data.|`xref:apis/tinymce.root.adoc[tinymce]`
|majorVersion|`String`|Major version of TinyMCE build.|`xref:apis/tinymce.root.adoc[tinymce]`
|minorVersion|`String`|Minor version of TinyMCE build.|`xref:apis/tinymce.root.adoc[tinymce]`
|pageUid|`String`|A uuid string to anonymously identify the page tinymce is loaded in|`xref:apis/tinymce.root.adoc[tinymce]`
|releaseDate|`String`|Release date of TinyMCE build.|`xref:apis/tinymce.root.adoc[tinymce]`
|suffix|`String`|Current suffix to add to each plugin/theme that gets loaded for example ".min".|`xref:apis/tinymce.root.adoc[tinymce]`
|===

69
modules/ROOT/pages/apis/tinymce.userlookup.adoc

@ -0,0 +1,69 @@
= tinymce.UserLookup
:navtitle: tinymce.UserLookup
:description: TinyMCE User Lookup API Handles user information retrieval and caching.
:keywords: fetchUsers, userId
:moxie-type: api
TinyMCE User Lookup API Handles user information retrieval and caching.
[[examples]]
== Examples
[source, javascript]
----
// Get the current user's ID from the editor options, or defaults to 'Anonymous'.
tinymce.activeEditor.userLookup.userId;
// Fetch user information by IDs which returns a record of promises
const userPromises = tinymce.activeEditor.userLookup.fetchUsers(['user-1', 'user-2']);
// Access individual promises by user ID
userPromises['user-1'].then(user => console.log('User 1:', user));
userPromises['user-2'].then(user => console.log('User 2:', user));
// Or wait for all promises
Promise.all(Object.values(userPromises)).then((users) => {
users.forEach(user => console.log('User found:', user));
}).catch((error) => {
console.error('Error fetching users:', error);
});
----
[[summary]]
== Summary
[[properties]]
=== Properties
[cols="2,1,4,1",options="header"]
|===
|Name|Type|Summary|Defined by
|userId|`String`|The current user's ID retrieved from the editor options, or defaults to 'Anonymous'.|`xref:apis/tinymce.userlookup.adoc[UserLookup]`
|===
[[methods-summary]]
=== Methods
[cols="2,5,1",options="header"]
|===
|Name|Summary|Defined by
|xref:#fetchUsers[fetchUsers()]|Fetches user information using a provided array of userIds.|`xref:apis/tinymce.userlookup.adoc[UserLookup]`
|===
[[methods]]
== Methods
[[fetchUsers]]
=== fetchUsers()
[source, javascript]
----
fetchUsers(userIds: string[]): Record<UserId, Promise<User>>
----
Fetches user information using a provided array of userIds.
==== Parameters
* `userIds (string[])` - - A list of user IDs to fetch information for.
==== Return value
* `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.
'''
Loading…
Cancel
Save