Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions modules/ROOT/pages/8.11.0-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@ The {productname} {release-version} release includes an accompanying release of

For information on the **<Premium plugin name 1>** plugin, see: xref:<plugincode>.adoc[<Premium plugin name 1>].

=== Format Painter

The {productname} {release-version} release includes an accompanying release of the **Format Painter** premium plugin.

**Format Painter** includes the following additions.

==== Double-clicking the format painter toolbar button now enables sticky mode, keeping the format painter active to apply the copied formatting multiple times
// #TINYMCE-15104

Previously, the format painter turned off after applying the copied formatting once. To apply the same formatting to several pieces of content with the toolbar button, users had to copy the formatting again before each application.

In {productname} {release-version}, double-clicking the format painter toolbar button turns on sticky mode. In sticky mode, the format painter stays active and applies the copied formatting to each piece of content the user selects. Clicking the toolbar button again or pressing `+Esc+` turns off sticky mode. For the steps, see: xref:formatpainter.adoc#using-format-painter[Using Format Painter].

==== New `+mceToggleStickyFormatPainter+` command to toggle the format painter sticky mode
// #TINYMCE-15104

Previously, no command turned on sticky mode in the format painter, so integrations could not start sticky mode programmatically.

In {productname} {release-version}, the new xref:formatpainter.adoc#commands[`+mceToggleStickyFormatPainter+`] command copies the formatting from the current selection and turns on sticky mode. Running the `+mceToggleFormatPainter+` command turns off sticky mode.

For information on the **Format Painter** plugin, see: xref:formatpainter.adoc[Format Painter].

=== Image Editing

The {productname} {release-version} release includes an accompanying release of the **Image Editing** premium plugin.
Expand Down Expand Up @@ -198,6 +220,13 @@ In {productname} {release-version}, the xref:accordion.adoc[Accordion plugin] ad

// CCFR here.

=== New `+onDoubleClick+` option for toolbar toggle buttons, called when the button is double clicked
// #TINYMCE-15104

Previously, a custom toolbar toggle button could respond only to single clicks, through its `+onAction+` function.

In {productname} {release-version}, toggle buttons registered with `+editor.ui.registry.addToggleButton+` accept a new optional xref:custom-toggle-toolbar-button.adoc#options[`+onDoubleClick+`] function. {productname} calls the function with the button API when the user double-clicks the button, unless the button is disabled. The browser registers each click of a double-click, so the `+onAction+` function runs twice before the `+onDoubleClick+` function runs.

=== The `+table_appearance_options+` option now also accepts an object with `+cellspacing+`, `+cellpadding+`, `+borderwidth+` and `+caption+` keys, to hide individual fields in the Table Properties dialog
// #TINYMCE-11998

Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/pages/custom-toggle-toolbar-button.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include::partial$misc/admon-predefined-icons-only.adoc[]
|active |boolean |optional |default: `false` - Represents the button's active state. When `true`, the button is highlighted. Can be changed using `+setActive+` from the button's API.
|onSetup |`+(api) => (api) => void+` |optional |default: `+() => () => {}+` - Function invoked when the button is rendered. For details, see: xref:using-onsetup[Using `+onSetup+`].
|onAction |`+(api) => void+` |required |Function invoked when the button is clicked.
|onDoubleClick |`+(api) => void+` |optional |Function invoked when the button is double-clicked. Not invoked when the button is disabled. The browser registers each click of a double-click, so `+onAction+` runs twice before `+onDoubleClick+` runs. Requires {productname} 8.11 or newer.
|shortcut |string |optional |Shortcut to display in the tooltip. To register a shortcut, see: xref:shortcuts.adoc[Add custom shortcuts to {productname}].
|context |string |optional |default: `mode:design` - The context property dynamically enables or disables the button based on the editor's current state. For details, see: xref:context.adoc[Context].
|===
Expand Down
11 changes: 11 additions & 0 deletions modules/ROOT/pages/formatpainter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ The format painter operates in two modes, one for retrieval and one for applicat

*Result*: The formatting from the source content is applied to the goal content.

*Usage with toolbar button in sticky mode*

Sticky mode keeps the format painter active to apply the same formatting to several pieces of content.

. Position the cursor at the source content to retrieve the formatting.
. Double-click the *Format Painter* button to copy the formatting and turn on sticky mode.
. Select each piece of goal content to apply the formatting.
. Click the *Format Painter* button or press `+Esc+` to turn off sticky mode.

*Result*: The formatting from the source content is applied to each piece of goal content.

*Usage with keyboard*

. Position the cursor at the source content to retrieve formatting.
Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/partials/commands/formatpainter-cmds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
|mceRetrieveFormats |Retrieves the formats from the current selection.
|mcePaintFormats |Applies the formats retrieved using `+mceRetrieveFormats+` to the current selection.
|mceToggleFormatPainter |Toggles the Format Painter.
|mceToggleStickyFormatPainter |Retrieves the formats from the current selection and turns on sticky mode, which keeps the Format Painter active to apply the formats to each selection. To turn off sticky mode, run `+mceToggleFormatPainter+`. Requires {productname} 8.11 or newer.
|===

.Examples
Expand All @@ -12,4 +13,5 @@
tinymce.activeEditor.execCommand('mceRetrieveFormats');
tinymce.activeEditor.execCommand('mcePaintFormats');
tinymce.activeEditor.execCommand('mceToggleFormatPainter');
tinymce.activeEditor.execCommand('mceToggleStickyFormatPainter');
----
Loading