From d523538774d9e4d90ebad0a7ad9055692dbb9a12 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Wed, 9 Oct 2024 15:42:01 +1000 Subject: [PATCH] DOC-2412: api-version bump, typo correction in advtemplate-readonly-template/index.js. --- .api-version | 2 +- .../advtemplate-readonly-template/index.js | 2 +- .../apis/tinymce.editor.ui.registry.adoc | 26 ++++++++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.api-version b/.api-version index 8b23b8d47c..b616717999 100644 --- a/.api-version +++ b/.api-version @@ -1 +1 @@ -7.3.0 \ No newline at end of file +7.4.0 \ No newline at end of file diff --git a/modules/ROOT/examples/live-demos/advtemplate-readonly-template/index.js b/modules/ROOT/examples/live-demos/advtemplate-readonly-template/index.js index c52d9a58ee..d14a053d9d 100644 --- a/modules/ROOT/examples/live-demos/advtemplate-readonly-template/index.js +++ b/modules/ROOT/examples/live-demos/advtemplate-readonly-template/index.js @@ -4,7 +4,7 @@ const data = [ items: [ { title: 'Message received', - content: '

Hey {{prefix}}Customer.FirstName\}}!

\n

Just a quick note to say we’ve received your message, and will get back to you within 48 hours.

\n

For reference, your ticket number is: {{mergetag-open}}Ticket.Number{{suffix}}

\n

Should you have any questions in the meantime, just reply to this email and it will be attached to this ticket.

\n

 

\n

Regards,

\n

{{prefix}}Agent.FirstName{{suffix}}

' + content: '

Hey {{prefix}}Customer.FirstName{{suffix}}!

\n

Just a quick note to say we’ve received your message, and will get back to you within 48 hours.

\n

For reference, your ticket number is: {{mergetag-open}}Ticket.Number{{suffix}}

\n

Should you have any questions in the meantime, just reply to this email and it will be attached to this ticket.

\n

 

\n

Regards,

\n

{{prefix}}Agent.FirstName{{suffix}}

' }, { title: 'Thanks for the feedback', diff --git a/modules/ROOT/pages/apis/tinymce.editor.ui.registry.adoc b/modules/ROOT/pages/apis/tinymce.editor.ui.registry.adoc index 331a81d878..967af87c39 100644 --- a/modules/ROOT/pages/apis/tinymce.editor.ui.registry.adoc +++ b/modules/ROOT/pages/apis/tinymce.editor.ui.registry.adoc @@ -1,7 +1,7 @@ = tinymce.editor.ui.Registry :navtitle: tinymce.editor.ui.Registry :description: TinyMCE UI registration API. -:keywords: addAutocompleter, addButton, addContextForm, addContextMenu, addContextToolbar, addGroupToolbarButton, addIcon, addMenuButton, addMenuItem, addNestedMenuItem, addSidebar, addSplitButton, addToggleButton, addToggleMenuItem, addView +:keywords: addAutocompleter, addButton, addContext, addContextForm, addContextMenu, addContextToolbar, addGroupToolbarButton, addIcon, addMenuButton, addMenuItem, addNestedMenuItem, addSidebar, addSplitButton, addToggleButton, addToggleMenuItem, addView :moxie-type: api TinyMCE UI registration API. @@ -29,6 +29,11 @@ via keyboard navigation controls. For information on creating a basic toolbar button, see: link:https://www.tiny.cloud/docs/tinymce/7/custom-basic-toolbar-button/[ UI Components - Types of toolbar buttons: Basic button].|`xref:apis/tinymce.editor.ui.registry.adoc[Registry]` +|xref:#addContext[addContext()]|Registers a new context configuration in the registry. +The registry stores all context configurations. +The buttons in editor configuration object can contain a context property. +These button specifications can use the registered contexts to determine +whether to enable or disable the buttons based on the current context.|`xref:apis/tinymce.editor.ui.registry.adoc[Registry]` |xref:#addContextForm[addContextForm()]|Registers a new contextual form item. Similar to a context menu item, a contextual form is an item with an input form element appearing when a content predicate is matched. An example @@ -184,6 +189,25 @@ UI Components - Types of toolbar buttons: Basic button]. ''' +[[addContext]] +=== addContext() +[source, javascript] +---- +addContext(name: String, pred: Function) +---- +Registers a new context configuration in the registry. +The registry stores all context configurations. +The buttons in editor configuration object can contain a context property. +These button specifications can use the registered contexts to determine +whether to enable or disable the buttons based on the current context. + +==== Parameters + +* `name (String)` - Unique name identifying the new context configuration. +* `pred (Function)` - A predicate function that determines if the context is active + +''' + [[addContextForm]] === addContextForm() [source, javascript]