Skip to content

Commit 230782c

Browse files
committed
DOC-3147: Remove reverted pagebreak_split_block, updated Split button CSS structure updates, general doc structural changes.
1 parent 9837b06 commit 230782c

File tree

1 file changed

+61
-100
lines changed

1 file changed

+61
-100
lines changed

modules/ROOT/pages/migration-from-7x.adoc

Lines changed: 61 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ Any items marked **"High"** level require immediate attention during migration.
3535
|Method deprecated. Use `dispatch()` for event handling.
3636
|Medium
3737
38+
<<<<<<< Updated upstream
3839
|xref:pagebreak-split-block-default[pagebreak_split_block]
3940
|The default value changed from `false` to `true`, affecting how page breaks interact with block elements.
4041
|Medium
4142
43+
=======
44+
>>>>>>> Stashed changes
4245
|xref:editor-documentbaseurl-removal[editor.documentBaseUrl]
4346
|Undocumented property removed. Use `editor.editorManager.documentBaseURI` instead.
4447
|Low
@@ -209,13 +212,13 @@ For complete details on license key manager setup and troubleshooting, see xref:
209212
This change improves security and aligns with DOMPurify's recommended defaults. However, existing content and integrations that relied on the previous, less strict sanitization behavior may be impacted.
210213
====
211214
212-
==== Key Changes
215+
**Key Changes**:
213216
214217
* **DOMPurify upgraded to 3.2.6**
215218
* **`SAFE_FOR_XML` enabled** — This setting enforces stricter handling of comments and attribute values, preventing certain XSS vectors.
216219
* **Content Impact** — HTML comments containing tags, Internet Explorer conditional comments, and attributes with HTML-like values may now be removed during sanitization. Content that was previously allowed may be stripped.
217220
218-
*Impact*: This change improves security by preventing potential XSS attacks through comments and attributes that were previously allowed. However, it may also result in content being stripped or altered unexpectedly.
221+
**Impact**: This change improves security by preventing potential XSS attacks through comments and attributes that were previously allowed. However, it may also result in content being stripped or altered unexpectedly.
219222
220223
**Migration Steps:**
221224
@@ -253,39 +256,20 @@ For information on disabling DOMPurify sanitization (not recommended), see xref:
253256
=== Split button CSS structure updates
254257
// #TINY-8665
255258
256-
{productname} {release-version} updates the internal structure of split buttons. Split buttons now render as two separate components with updated CSS classes:
259+
{productname} {productmajorversion} updates the internal structure of split buttons. Split buttons now render as two separate components for the main action and the dropdown chevron.
257260
258-
* `.tox-split-button__main` — Main action button
259-
* `.tox-split-button__chevron` — Dropdown chevron button
261+
**Impact**: This change only affects users with custom skins.
260262
261-
**Impact**: This change improves the flexibility of split button styling and allows for more granular control over each component.
263+
**Migration steps**:
262264
263-
**Migration steps:**
264-
265-
Update all CSS selectors and styles that previously targeted the unified `.tox-split-button` class to target the new `.tox-split-button__main` and `.tox-split-button__chevron` classes.
266-
267-
[source,css]
268-
----
269-
/* Before TinyMCE 8.0 */
270-
.tox-split-button {
271-
/* Previous styling approach */
272-
}
273-
274-
/* TinyMCE 8.0+ */
275-
.tox-split-button__main {
276-
/* Main button styling */
277-
}
278-
279-
.tox-split-button__chevron {
280-
/* Chevron button styling */
281-
}
282-
----
265+
If you have a custom skin, rebuild it using the {productname} {productmajorversion} codebase. See xref:creating-a-skin.adoc[Creating a Skin] for guidance on the custom skin development process.
283266
284267
**Migration checklist:**
285268
286-
* [ ] Search your CSS for `.tox-split-button` and update to use `.tox-split-button__main` and `.tox-split-button__chevron`.
287-
* [ ] Test all split button styles in your application to ensure they render correctly.
288-
* [ ] Update any custom plugins that use split buttons to reflect the new structure.
269+
* [ ] Identify if you are using a custom skin.
270+
* [ ] Rebuild your custom skin using the {productname} {productmajorversion} codebase.
271+
* [ ] Test your custom skin with split buttons in {productname} {productmajorversion}.
272+
* [ ] Refer to xref:creating-a-skin.adoc[Creating a Skin] for details.
289273
290274
== Core API Changes
291275
@@ -294,39 +278,38 @@ Update all CSS selectors and styles that previously targeted the unified `.tox-s
294278
295279
IMPORTANT: The following sections detail important changes that require updates to your code. Please review each section carefully.
296280
297-
=== Removed Methods
281+
=== Updated Methods
298282
299-
[[editor-selection-setcontent-deprecated]]
300-
==== editor.selection.setContent
301-
[.discrete]
302-
// #TINY-12109
283+
[[skipfocus-consolidation]]
284+
==== skipFocus and skip_focus
285+
// #TINY-12044
303286
304-
The `editor.selection.setContent` API has been deprecated and will be removed in {productname} 9.
287+
The `skipFocus` and `skip_focus` options for the `ToggleToolbarDrawer` command have been consolidated into a single, more consistent argument. This reduces API complexity and clarifies the intended behavior.
305288
306-
*Impact*: This change simplifies content manipulation by consolidating insertion methods.
289+
**Impact**: This change simplifies focus management, reducing the risk of confusion and unexpected behavior.
307290
308291
**Migration steps:**
309292
310-
To replace `editor.selection.setContent`, use `editor.insertContent` instead. The new method is more consistent with other content manipulation methods in {productname}.
311-
312-
.Example Usage
313-
[source,javascript]
293+
[source, javascript]
314294
----
315-
// Deprecated in TinyMCE 8, will be removed in 9
316-
editor.selection.setContent('<p>New content</p>');
295+
// Old approach (Deprecated) in TinyMCE 8
296+
editor.execCommand('ToggleToolbarDrawer', { skip_focus: false }, { skipFocus: true });
317297
318-
// Recommended replacement
319-
editor.insertContent('<p>New content</p>');
298+
// New approach (Recommended)
299+
editor.execCommand('ToggleToolbarDrawer', false, { skipFocus: true });
320300
----
321301
322302
**Migration checklist:**
323303
324-
* [ ] Replace all instances of `editor.selection.setContent` with `editor.insertContent`
325-
* [ ] Update custom plugins that use the old method
326-
* [ ] Test content insertion in your editor instances
304+
* [ ] Locate all instances of `ToggleToolbarDrawer` command usage
305+
* [ ] Replace `skip_focus` with `skipFocus` in command options
306+
* [ ] Update any custom plugins using this command
307+
* [ ] Test toolbar drawer behavior after changes
327308
328309
'''
329310
311+
=== Removed Methods
312+
330313
[[editor-documentbaseurl-removal]]
331314
==== editor.documentBaseUrl
332315
[.discrete]
@@ -376,34 +359,36 @@ For more information see: link:https://www.tiny.cloud/docs/tinymce/latest/apis/t
376359
377360
'''
378361
379-
[[skipfocus-consolidation]]
380-
==== skipFocus and skip_focus
381-
// #TINY-12044
362+
=== Deprecated Methods
382363
383-
The `skipFocus` and `skip_focus` options for the `ToggleToolbarDrawer` command have been consolidated into a single, more consistent argument. This reduces API complexity and clarifies the intended behavior.
364+
[[editor-selection-setcontent-deprecated]]
365+
==== editor.selection.setContent
366+
[.discrete]
367+
// #TINY-12109
384368
385-
**Impact**: This change simplifies focus management, reducing the risk of confusion and unexpected behavior.
369+
The `editor.selection.setContent` API has been deprecated and will be removed in {productname} 9.
370+
371+
*Impact*: This change simplifies content manipulation by consolidating insertion methods.
386372
387373
**Migration steps:**
388374
389-
[source, javascript]
375+
To replace `editor.selection.setContent`, use `editor.insertContent` instead. The new method is more consistent with other content manipulation methods in {productname}.
376+
377+
.Example Usage
378+
[source,javascript]
390379
----
391-
// Old approach (Deprecated) in TinyMCE 8
392-
editor.execCommand('ToggleToolbarDrawer', { skip_focus: false }, { skipFocus: true });
380+
// Deprecated in TinyMCE 8, will be removed in 9
381+
editor.selection.setContent('<p>New content</p>');
393382
394-
// New approach (Recommended)
395-
editor.execCommand('ToggleToolbarDrawer', false, { skipFocus: true });
383+
// Recommended replacement
384+
editor.insertContent('<p>New content</p>');
396385
----
397386
398387
**Migration checklist:**
399388
400-
* [ ] Locate all instances of `ToggleToolbarDrawer` command usage
401-
* [ ] Replace `skip_focus` with `skipFocus` in command options
402-
* [ ] Update any custom plugins using this command
403-
* [ ] Test toolbar drawer behavior after changes
404-
405-
406-
=== Deprecated Methods
389+
* [ ] Replace all instances of `editor.selection.setContent` with `editor.insertContent`
390+
* [ ] Update custom plugins that use the old method
391+
* [ ] Test content insertion in your editor instances
407392
408393
[[fire-method-deprecation]]
409394
==== `fire()`
@@ -477,35 +462,7 @@ The Image and Accessibility Checker plugins now follow the latest W3C standards
477462
478463
For more information on the changes, see: xref:a11ychecker.adoc##image-rules[Accessibility Checker: Image rules].
479464
480-
[[pagebreak-split-block-default]]
481-
==== Page Break Plugin: Export PDF/Word Compatibility and Option Updates
482-
// #TINY-12013, #TINY-12462
483-
484-
The Page Break plugin has been updated to work out-of-the-box with the xref:exportpdf.adoc[Export to PDF] and xref:exportword.adoc[Export to Word] plugins, addressing a common pain point for developers. As part of this update:
485-
486-
* The default value of the xref:pagebreak.adoc#pagebreak_separator[`pagebreak_separator`] option now uses a block tag (`<div style="break-after: page
487-
* The default value of the xref:pagebreak.adoc#pagebreak_split_block[`pagebreak_split_block`] option has changed from `false` to `true`.
488-
489-
This means that by default, inserting a page break will now automatically split block elements (such as paragraphs, lists, or tables) at the cursor position, and the separator will be compatible with both export services.
490-
491-
**Impact**: These changes improve the export experience and provide a more intuitive editing experience.
492-
493-
**Migration steps:**
494-
495-
* If you want to restore the previous (v7) behavior, where page breaks do not automatically split block elements and use a comment tag as the separator, set both options explicitly in your configuration:
496-
497-
[source, javascript]
498-
----
499-
tinymce.init({
500-
// ...other configuration options...
501-
pagebreak_separator: '<!-- my page break -->',
502-
pagebreak_split_block: false
503-
});
504-
----
505-
506-
=== Technical Improvements and Cleanup
507-
508-
==== Cross-Origin Resource Loading Configuration
465+
=== Cross-Origin Resource Loading Configuration
509466
// #TINY-12228, TINY-12326
510467
511468
When upgrading to {productname} 8, you will need to review and possibly update how your integration handles cross-origin resource loading. {productname} 8 provides a new configuration option for controlling the `crossorigin` attribute on loaded resources.
@@ -523,18 +480,20 @@ When upgrading to {productname} 8, you will need to review and possibly update h
523480
+
524481
. If your application loads resources (scripts or stylesheets) from different domains:
525482
+
526-
* Configure the new crossorigin function in your `tinymce.init`:
483+
* Configure the new crossorigin function to control the `crossorigin` attribute for all resources.
527484
+
528485
[source, javascript]
529486
----
487+
const crossOriginFunction = (url, resourceType) => {
488+
// Returning 'anonymous' or 'use-credentials' here would explicitly set the attribute
489+
return 'anonymous';
490+
// return 'use-credentials';
491+
// return undefined; // Omits the 'crossorigin' attribute for all resources by returning undefined
492+
};
493+
530494
tinymce.init({
531495
selector: "textarea",
532-
crossorigin: (url, resourceType) => {
533-
// Returning 'anonymous' or 'use-credentials' here would explicitly set the attribute
534-
// return 'anonymous';
535-
// return 'use-credentials';
536-
return undefined; // Omit the 'crossorigin' attribute for all resources by returning undefined
537-
},
496+
crossorigin: crossOriginFunction
538497
});
539498
----
540499
+
@@ -552,6 +511,8 @@ tinymce.init({
552511
553512
For complete details on the new crossorigin function API, see: xref:tinymce-and-cors.adoc#crossorigin[crossorigin configuration option].
554513
514+
=== Technical Cleanup
515+
555516
==== Removed Empty Files
556517
// #TINY-11287, #TINY-12084
557518

0 commit comments

Comments
 (0)