Skip to content

Commit 349d390

Browse files
authored
Merge branch 'tinymce/8' into release/8.2.0
2 parents 5856589 + b350b15 commit 349d390

29 files changed

+1491
-242
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<div style="display: flex; gap: 20px; width: 100%; flex-wrap: wrap;">
2+
<div style="flex: 1; min-width: 300px;">
3+
<h2>Default TinyMCE Icons</h2>
4+
<textarea id="default-editor" style="width: 100%;">
5+
<h2>Default Icons Editor</h2>
6+
<p>This editor uses the <strong>default TinyMCE icons</strong>.</p>
7+
<p>Notice the standard appearance of the toolbar buttons.</p>
8+
<ul>
9+
<li>Bold, italic, underline buttons</li>
10+
<li>Link and image buttons</li>
11+
<li>List and code buttons</li>
12+
</ul>
13+
</textarea>
14+
</div>
15+
<div style="flex: 1; min-width: 300px;">
16+
<h2>Custom Icon Pack</h2>
17+
<textarea id="custom-editor" style="width: 100%;">
18+
<h2>Custom Icons Editor</h2>
19+
<p>This editor uses a <strong>custom icon pack</strong> created with our icon pack system.</p>
20+
21+
<h3>How It Works:</h3>
22+
<p><strong>Demo Setup:</strong> For this live demo, the custom icons are defined using <code>tinymce.IconManager.add()</code> directly in the JavaScript file.</p>
23+
24+
<p><strong>Production Setup:</strong> In normal usage, you would:</p>
25+
<ul>
26+
<li>Build your icon pack using the template (see our guide)</li>
27+
<li>Place the generated <code>icons.js</code> file in <code>dist/icons/your-pack-name/</code></li>
28+
<li>Use <code>icons_url: 'path/to/icons.js'</code> to load it</li>
29+
</ul>
30+
31+
<p>The editor is configured with <code>icons: 'my-icon-pack'</code> to use the custom icons. <strong>Try the custom buttons:</strong> Look for the custom bold, italic, and audio buttons in the toolbar above.</p>
32+
</textarea>
33+
</div>
34+
</div>
35+
36+
<div style="margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 4px; font-size: 14px; color: #666;">
37+
<strong>Icon Credits:</strong> Custom icons in this demo are sourced from <a href="https://freesvgicons.com/" target="_blank" rel="noopener">FreeSVGIcons.com</a> - a collection of 250k+ open-source SVG icons.
38+
</div>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Load custom icon pack inline (for live demo compatibility)
2+
tinymce.IconManager.add('my-icon-pack', {
3+
icons: {
4+
'audio': '<svg width="24" height="24"><path d="M10.8 19q.9 0 1.5-.7t.7-1.5V13h3v-2h-4v3.9l-.6-.3-.6-.1q-1 0-1.7.7t-.6 1.6q0 .9.7 1.5t1.6.7ZM6 22q-.8 0-1.4-.6T4 20V4q0-.8.6-1.4T6 2h8l6 6v12q0 .8-.6 1.4T18 22H6Zm7-13h5l-5-5v5Z"/></svg>',
5+
'bold': '<svg width="24" height="24"><path fill-rule="evenodd" d="M3.6 2.3a1.4 1.4 0 0 0-1.4 1.3v16.8c0 .7.7 1.4 1.4 1.4h16.8a1.4 1.4 0 0 0 1.4-1.4V3.6a1.4 1.4 0 0 0-1.4-1.3H3.6Zm6 4a1.4 1.4 0 0 0-1.3 1.3v9.3c0 .7.6 1.4 1.3 1.4H12v-.8.8a2.5 2.5 0 0 0 .2 0 4.6 4.6 0 0 0 1.6-.5c.5-.2 1-.5 1.3-1 .4-.5.7-1.2.7-2 0-.9-.3-1.6-.7-2a3.2 3.2 0 0 0-.8-.9 2.8 2.8 0 0 0 .4-.5c.4-.5.5-1.1.5-1.9s-.1-1.4-.5-1.9a3 3 0 0 0-1.1-1 3.9 3.9 0 0 0-1.6-.3H9.6Zm.1 6.5H12a3.2 3.2 0 0 1 1.2.2l.7.6c.2.2.4.6.4 1.1s-.2 1-.4 1.2a1.8 1.8 0 0 1-.7.6 3.2 3.2 0 0 1-1.1.2H9.7v-4Zm2.3 4Zm0-5.6H9.7V7.8H12l1 .2.5.5c.1.2.3.5.3 1s-.2.8-.3 1a1.4 1.4 0 0 1-.6.5 2.3 2.3 0 0 1-.9.2Z" clip-rule="evenodd"/></svg>',
6+
'italic': '<svg width="24" height="24"><path fill-rule="evenodd" d="M3.6 2.3a1.4 1.4 0 0 0-1.4 1.3v16.8c0 .7.7 1.4 1.4 1.4h16.8a1.4 1.4 0 0 0 1.4-1.4V3.6a1.4 1.4 0 0 0-1.4-1.3H3.6ZM16 6.8h-1.5L11 17.1h1a.8.8 0 0 1 0 1.6H8a.8.8 0 0 1 0-1.6h1.5L13 6.8h-1a.8.8 0 0 1 0-1.5h4a.8.8 0 0 1 0 1.5Z" clip-rule="evenodd"/></svg>',
7+
}
8+
});
9+
10+
// Default Icons Editor
11+
tinymce.init({
12+
selector: '#default-editor',
13+
icons: 'material', // use material icon pack
14+
plugins: 'lists link image code',
15+
toolbar: 'undo redo | bold italic underline | bullist numlist | link image code',
16+
height: 500,
17+
// license_key: 'gpl'
18+
});
19+
20+
// Custom Icons Editor
21+
tinymce.init({
22+
selector: '#custom-editor',
23+
icons: 'my-icon-pack',
24+
plugins: 'lists link image code',
25+
toolbar: 'undo redo | myButton1 myButton2 myButton3 | bullist numlist | link image code',
26+
height: 500,
27+
setup: (editor) => {
28+
editor.ui.registry.addButton('myButton1', {
29+
icon: 'bold', // the 'bold' icon created from 'bold.svg'
30+
onAction: (_) => {
31+
editor.insertContent('&nbsp;<strong>It\'s my custom bold icon button!</strong>&nbsp;');
32+
}
33+
});
34+
editor.ui.registry.addButton('myButton2', {
35+
icon: 'italic', // the 'italic' icon created from 'italic.svg'
36+
onAction: (_) => {
37+
editor.insertContent('&nbsp;<strong>It\'s my custom italic icon button!</strong>&nbsp;');
38+
}
39+
});
40+
editor.ui.registry.addButton('myButton3', {
41+
icon: 'audio', // the 'audio' icon created from 'audio.svg'
42+
onAction: (_) => {
43+
editor.insertContent('&nbsp;<strong>It\'s my custom audio icon button!</strong>&nbsp;');
44+
}
45+
});
46+
}
47+
});
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

modules/ROOT/nav.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
* xref:getting-started.adoc[Getting started]
2-
** xref:introduction-to-tinymce.adoc[What is {productname}?]
2+
** xref:introduction-to-tinymce.adoc[Introduction to {productname}]
33
** xref:installation.adoc[Installation]
44
*** Cloud
55
**** xref:cloud-quick-start.adoc[Quick start]
@@ -208,7 +208,11 @@
208208
**** xref:bundling-localization.adoc[UI localizations]
209209
**** xref:bundling-themes.adoc[Themes]
210210
** xref:upgrading.adoc[Upgrading {productname}]
211-
** xref:migration-from-7x.adoc[Migrating from {productname} 7]
211+
** xref:migration-guides.adoc[Migration guides]
212+
*** xref:migration-from-4x.adoc[Migrating from {productname} 4]
213+
*** xref:migration-from-5x.adoc[Migrating from {productname} 5]
214+
*** xref:migration-from-6x.adoc[Migrating from {productname} 6]
215+
*** xref:migration-from-7x.adoc[Migrating from {productname} 7]
212216
** xref:migration-from-froala.adoc[Migrating from Froala]
213217
** xref:generate-rsa-key-pairs.adoc[Generate public key pairs]
214218
** xref:understanding-editor-loads.adoc[Understanding editor loads]

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,13 @@ In {productname} {release-version}, the parser has been updated to improve the r
622622

623623
{productname} {release-version} includes the following deprecations:
624624

625+
=== Java Swing integration has been deprecated
626+
// #DOC-3304
627+
628+
{productname}'s Java Swing integration has been deprecated in {productname} 8.0 and will reach end-of-life as of December 31, 2025.
629+
630+
For information about the Java Swing integration, see: xref:swing.adoc[TinyMCE for Java Swing integration]
631+
625632
=== Java application server-based server components have been deprecated
626633
// #DOC-3231
627634

modules/ROOT/pages/advtable.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99

1010
include::partial$misc/admon-premium-plugin.adoc[]
1111

12-
[TIP]
13-
As of {productname} 7.0, the Advanced Tables plugin is now named {pluginname}. When using the {pluginname} plugin in your editor, continue to use {plugincode} in the `+plugins+` list.
14-
1512
The `+advtable+` plugin is a premium plugin that extends the core xref:table.adoc[`+table+` plugin] by adding the following advanced functionality:
1613

1714
* Sort options for rows and columns.
1815
* Row numbering column for tables.
1916
20-
== Try our Enhanced Tables Demo
17+
== Interactive demo
2118

2219
liveDemo::advtable[]
2320

@@ -35,12 +32,13 @@ tinymce.init({
3532
});
3633
----
3734

35+
3836
== Sorting table rows and columns
3937

4038
Tables can be sorted by row or column values using:
4139

4240
* The *Sort* options in the *Table* menu.
43-
* The *Sort* options in the table contextual menu.
41+
* The *Sort* options in the *Table* contextual menu.
4442
* The *Sort* options in the *Table* toolbar menu button.
4543

4644
*For example:*
@@ -66,7 +64,7 @@ A numeric and alpha value series are available by default. The available value s
6664

6765
image::advtable-row-numbering.png[Table with numeric row numbering column and row numbering menu open (Numeric item checked)]
6866

69-
A commonly desired customisation of the row-numbering column is that a table’s header and footer rows not be included in the numbering.
67+
A commonly desired customization of the row-numbering column is that a table’s header and footer rows not be included in the numbering.
7068

7169
This can be done using the xref:advtable_value_series[`+advtable_value_series+` option] to specify a custom generator.
7270

modules/ROOT/pages/bundling-icons.adoc

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,87 @@
33
:description_short: Information on bundling icon packs
44
:description: Information on bundling TinyMCE icon packs using module loading
55

6+
== Overview
7+
8+
Icon packs provide visual styling for {productname}'s toolbar buttons, menu items, and contextual toolbars. When bundling {productname} with a module loader, icon packs can be included to customize the editor's appearance.
9+
10+
{productname} includes both community and premium icon packs:
11+
12+
* **Community icon packs**: Available with all {productname} installations
13+
* **Premium icon packs**: Available with paid {productname} subscriptions
14+
15+
The default icon pack is always required and provides the base set of icons. Additional icon packs can be bundled to extend or replace the default icons.
16+
617
:editorcomponent: icon pack
718
include::partial$module-loading/bundling-ref-example.adoc[]
819
:!editorcomponent:
920

10-
The following table shows examples of the syntax used to bundle the following icon pack:
21+
== Bundling syntax examples
1122

12-
....
13-
./icons/example/icons.js
14-
....
15-
16-
Example syntax for including the example icon pack in a bundle:
23+
The following examples show how to bundle icon packs using different module syntaxes. The examples use the `material` icon pack, but the same syntax applies to all available icon packs.
1724

1825
[cols='1,1,4']
19-
|===
26+
|====
2027
|Module Syntax |Source |Example
2128

2229
.2+|ES6+
2330
|npm
2431
a|
2532
[source, js]
2633
----
27-
import 'tinymce/icons/example';
34+
import 'tinymce/icons/material';
2835
----
2936

3037
|`.zip`
3138
a|
3239
[source, js]
3340
----
34-
import '../tinymce/icons/example/icons';
41+
import '../tinymce/icons/material/icons';
3542
----
3643

3744
.2+|Common JS
3845
|npm
3946
a|
4047
[source, js]
4148
----
42-
require('tinymce/icons/example');
49+
require('tinymce/icons/material');
4350
----
4451

4552
|`.zip`
4653
a|
4754
[source, js]
4855
----
49-
require('../tinymce/icons/example/icons.js');
56+
require('../tinymce/icons/material/icons.js');
5057
----
51-
|===
58+
|====
59+
60+
== Available icon packs
5261

5362
include::partial$module-loading/bundling-icon-files.adoc[]
63+
64+
== Usage in editor configuration
65+
66+
After bundling an icon pack, configure the editor to use it by setting the `icons` option:
67+
68+
[source, js]
69+
----
70+
tinymce.init({
71+
selector: 'textarea',
72+
icons: 'material', // Use the bundled material icon pack
73+
plugins: [
74+
"advlist", "anchor", "autolink", "charmap", "code", "fullscreen",
75+
"help", "image", "insertdatetime", "link", "lists", "media",
76+
"preview", "searchreplace", "table", "visualblocks",
77+
],
78+
toolbar: "undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
79+
});
80+
----
81+
82+
== Troubleshooting
83+
84+
**Icons not displaying**: Ensure the icon pack is properly bundled and the `icons` option matches the bundled pack name.
85+
86+
**Missing icons**: The default icon pack is always required. Additional icon packs extend or replace default icons but do not provide all necessary icons on their own.
87+
88+
**Build errors**: Verify that the icon pack path is correct and the pack exists in your {productname} installation.
89+

0 commit comments

Comments
 (0)