Skip to content

Commit 1e74fb2

Browse files
authored
Merge branch 'feature/7.6.0/DOC-2578' into feature/7.6.0/DOC-2578_TINY-11494
2 parents 53dd99a + 17285e3 commit 1e74fb2

File tree

4 files changed

+156
-1
lines changed

4 files changed

+156
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<textarea id="context-toolbar-labels">
2+
<p>Clicking on the example image below will show the newly configured context toolbar.</p>
3+
4+
{{logofordemoshtml}}
5+
6+
<p>Select a word in this sentence, to see the other newly configured context toolbar.</p>
7+
8+
<p>Clicking on text should not invoke the context toolbar</p>
9+
</textarea>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
tinymce.init({
2+
selector: 'textarea#context-toolbar-labels',
3+
height: 350,
4+
setup: (editor) => {
5+
editor.ui.registry.addContextToolbar('imagealignment', {
6+
predicate: (node) => node.nodeName.toLowerCase() === 'img',
7+
position: 'node',
8+
scope: 'node',
9+
items: [
10+
{
11+
name: 'Formatting',
12+
items: ['alignleft', 'aligncenter', 'alignright']
13+
},
14+
{
15+
label: 'Copy',
16+
items: ['copy', 'paste']
17+
}
18+
],
19+
});
20+
21+
editor.ui.registry.addContextToolbar('textselection', {
22+
predicate: (node) => !editor.selection.isCollapsed(),
23+
position: 'selection',
24+
scope: 'node',
25+
items: [
26+
{
27+
name: 'Format',
28+
items: ['bold', 'italic', 'underline']
29+
},
30+
],
31+
});
32+
},
33+
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
34+
});

modules/ROOT/pages/7.6.0-release-notes.adoc

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,41 @@ In {productname} {release-version}, the focus behaviour has now been improved in
168168
* Creating a new comment within an existing conversation now brings the focus to the corresponding conversation card.
169169
* Starting a new conversation now brings the focus to the newly created conversation card.
170170

171+
==== Added tooltips to conversation and comment kebab menus
172+
173+
In previous versions of **Comments**, the kebab menu button in the comments sidebar was missing a tooltip for users relying on assistive technologies.
174+
175+
{productname} {release-version} addresses this issue, by adding an `aria-label` with the description "Comment Actions" to the sidebar comment menu button, ensuring a tooltip is displayed on hover. This update improves accessibility and aligns the user experience across different menu buttons.
176+
171177
For information on the **Comments** plugin, see: xref:introduction-to-tiny-comments.adoc[Introduction to {companyname} Comments].
172178

179+
=== Comments
180+
181+
The {productname} {release-version} release includes an accompanying release of the **Comments** premium plugin.
182+
183+
**Comments** Premium plugin includes the following fixes and improvements.
184+
185+
==== The caret in comment textarea returned to its previous location before closing the mentions menu by selecting with the mouse.
186+
// #TINY-11453
187+
188+
Previously, when closing the Mentions dropdown in a Comment textarea by clicking away, the caret would revert to its previous position, disregarding the user’s mouse-click location. This issue occurred because the logic for handling caret positioning did not account for mouse interactions, resulting in a disjointed and confusing user experience.
189+
190+
In {productname} {release-version} this issue was addressed. Now, the caret now accurately reflects the user’s intended position when the Mentions dropdown is closed via a mouse-click.
191+
192+
For information on the **Comments** plugin, see: xref:introduction-to-tiny-comments.adoc[Introduction to {companyname} Comments].
193+
194+
=== Enhanced Code Editor
195+
// #TINY-11298
196+
197+
The {productname} {release-version} release includes an accompanying release of the **Enhanced Code Editor** premium plugin.
198+
199+
**Enhanced Code Editor** Premium plugin includes the following fix.
200+
201+
==== Spelling error in tooltip for `fullscreen` toggle button
202+
203+
The tooltip for the `fullscreen` toggle button was incorrectly labeled as `Fullsceen`. {productname} {release-version} addresses this issue which has now been corrected to `Fullscreen`.
204+
205+
For information on the **Enhanced Code Editor** plugin, see: xref:advcode.adoc[Enhanced Code Editor]
173206

174207
[[accompanying-premium-plugin-end-of-life-announcement]]
175208
== Accompanying Premium plugin end-of-life announcement
@@ -213,7 +246,33 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
213246
=== <TINY-vwxyz 1 changelog entry>
214247
// #TINY-vwxyz1
215248

216-
== New `+disabled+` option for disabling all user interactions
249+
=== Add Labels and Groups for Context Toolbar Buttons
250+
// #TINY-11095
251+
252+
The release of {productname} {release-version} introduces the ability to organize context toolbar buttons into groups with optional labels or titles. This enhancement, available from {productname} 7.6.0 onward, improves toolbar usability by enabling clearer categorization of buttons.
253+
254+
The `items` object structure now supports defining groups with an optional `name` property for titles or a `label` property for identifying the group. This feature allows developers to create more intuitive and accessible toolbars by visually segmenting functionality.
255+
256+
Example of a context toolbar configuration with groups and labels:
257+
258+
.Example
259+
[source,js]
260+
----
261+
items: [
262+
{
263+
name: 'Formatting', // Optional, used as the group's title
264+
items: [ 'bold', 'italic' ] // Array of registered button names
265+
},
266+
{
267+
label: 'History', // Optional, used as a label for the group
268+
items: [ 'undo', 'redo' ] // Array of registered button names
269+
},
270+
]
271+
----
272+
273+
For more details on configuring context toolbar groups and labels, see: xref:contexttoolbar.adoc#add-labels-and-groups-for-context-toolbar-buttons[Context Toolbar].
274+
275+
=== New `+disabled+` option for disabling all user interactions
217276

218277
A new `+disabled+` option has been introduced to {productname} in version {release-version}. This option allows integrators to disable all user interactions with the editor, including cursor placement, content modifications, and UI components. When set to `+true+`, the editor behaves similarly to the readonly mode changes introduced in {productname} 7.4.0 but ensures complete non-interactivity.
219278

@@ -245,6 +304,24 @@ A new `+onSetup+` API has been introduced for context forms, enabling integrator
245304

246305
For more details, refer to xref:contextform.adoc#form[Context Form].
247306

307+
=== Added placeholder support for context form input fields
308+
// #TINY-11459
309+
310+
A new `placeholder` option has been introduced to the context form API, addressing the need for inline guidance within input fields. This feature enables developers to specify placeholder text that appears inside input fields until the field is focused or a value is entered. By providing contextual hints, this enhancement improves usability and enhances the user experience.
311+
312+
.Example: Using a placeholder in a context form input field
313+
[source,js]
314+
----
315+
editor.ui.registry.addContextForm('upload-url', {
316+
launch: {
317+
type: 'contextformtogglebutton',
318+
icon: 'link',
319+
tooltip: 'Upload from URL'
320+
},
321+
placeholder: 'Enter URL here...', ....
322+
});
323+
----
324+
248325

249326
[[changes]]
250327
== Changes

modules/ROOT/pages/contexttoolbar.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,41 @@ This example shows how the quickbars plugin adds the standard selection context
2727

2828
liveDemo::context-toolbar[height="600", tab="js"]
2929

30+
[[add-labels-and-groups-for-context-toolbar-buttons]]
31+
== Add labels and groups for context toolbar buttons
32+
33+
From {productname} 7.6.0 onward, registering a context toolbar allows specifying `items` as an object that supports grouping with optional names and labels. This improvement enhances toolbar usability by organizing buttons into titled or labeled groups.
34+
35+
The object structure takes two optional properties: `name` and `label`.
36+
37+
* `name`: property is used as the group's title for the group that contains the buttons.
38+
* `label`: property is used as a label for each group of buttons.
39+
40+
[NOTE]
41+
If neither `name` nor `label` is specified, the behavior defaults to ungrouped buttons.
42+
43+
The object structure for `items` is as follows:
44+
45+
.Example of a context toolbar configuration with groups and labels
46+
[source,js]
47+
----
48+
items: [
49+
{
50+
name: 'Formatting', // Optional, used as the group's title
51+
items: [ 'bold', 'italic' ] // Array of registered button names
52+
},
53+
{
54+
label: 'History', // Optional, used as a label for the group
55+
items: [ 'undo', 'redo' ] // Array of registered button names
56+
},
57+
{
58+
items: [ 'undo', 'italic' ] // No name or label specified, default behavior applies
59+
}
60+
]
61+
----
62+
63+
liveDemo::context-toolbar-labels[height="600", tab="js"]
64+
3065
== Launching a context toolbar programmatically
3166

3267
There is an `+editor+` event called `+contexttoolbar-show+` that can be fired to show a context toolbar at the current selection. The event takes a parameter `+toolbarKey+` which specifies the name of the registered context form or context toolbar to show.

0 commit comments

Comments
 (0)