Skip to content

V15: Revert "Fix: RTE markup props not up to date issue"#18878

Closed
iOvergaard wants to merge 2 commits intov15/devfrom
v15/bugfix/tinymce-special-chars-regression
Closed

V15: Revert "Fix: RTE markup props not up to date issue"#18878
iOvergaard wants to merge 2 commits intov15/devfrom
v15/bugfix/tinymce-special-chars-regression

Conversation

@iOvergaard
Copy link
Contributor

Description

This fixes a regression introduced by #18430 and reported in #18795

Fixes #18795

iOvergaard and others added 2 commits March 31, 2025 10:30
cherry-picked from c03a8af

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Copilot AI review requested due to automatic review settings March 31, 2025 08:33
@iOvergaard iOvergaard review requested due to automatic review settings March 31, 2025 08:33
@iOvergaard iOvergaard enabled auto-merge (squash) March 31, 2025 08:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts changes made to fix an issue with RTE markup update behavior that introduced a regression. The changes revert modifications to how the markup state is tracked and updated across the TinyMCE and RTE components.

  • Revert switching from super.value to this.value in the TinyMCE property editor.
  • Remove the equality check in the TinyMCE input component set value.
  • Adjust RTE base element logic to consistently use the _latestMarkup property.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Umbraco.Web.UI.Client/src/packages/tiny-mce/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.ts Reverts value update to use this.value with _latestMarkup and adds clarifying comments.
src/Umbraco.Web.UI.Client/src/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.ts Removes an equality check for newValue to permit unconditional update propagation.
src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts Replaces comparisons and assignments to rely on _latestMarkup instead of _markup to maintain consistency.
Comments suppressed due to low confidence (2)

src/Umbraco.Web.UI.Client/src/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.ts:63

  • Removing the equality check may lead to unnecessary updates; please double-check that this change aligns with the intended update logic.
if (newValue === this.value) return;

src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts:63

  • Confirm that switching from comparing _markup to _latestMarkup is consistent with overall state management and does not introduce side effects.
if (this._latestMarkup !== super.value.markup) {

Comment on lines +42 to +43
// maybe in this way doc.body.innerHTML;

Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The comment is ambiguous and may cause confusion; consider clarifying its intent or removing it if no longer needed.

Suggested change
// maybe in this way doc.body.innerHTML;
// TODO: Consider using doc.body.innerHTML to get the content of the editor.

Copilot uses AI. Check for mistakes.
@iOvergaard iOvergaard disabled auto-merge March 31, 2025 08:35
@iOvergaard iOvergaard closed this Mar 31, 2025
@iOvergaard iOvergaard deleted the v15/bugfix/tinymce-special-chars-regression branch May 5, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants